Fred van Engen wrote:

> On Fri, Jan 25, 2002 at 02:22:12PM +0100, Marek Kustka wrote:
> 
>>following query
>>"SELECT LAST_INSERT_ID() as auto_num FROM xrenders;"
>>fills our whole slow query log (500 kB a day).
>>
>>
> 
> Just do 'select last_insert_id() as auto_num'.
> 
> The id isn't kept per table anyway, it is kept per session.
> 
> 
> Regards,
> 
> Fred.

Oooooh, that was stupid bug. It was correct in the other case I mentioned.
I haven't noticed the difference. The new server probably treated the
statement differently than the previous one.

Thanks much Fred! Virtual beer for you :)
Marek
-- 
<MK>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to