As of a couple of months ago, there is a bug with DBI's implementation of 
$dbh->{'mysql_insert'}.  It didn't handle 64-bit IDs correctly.  We converted 
everything to use SELECT LAST_INSERT_ID().  It works.  MySQL is fine, the 
problem was in DBI.

Don't use SELECT MAX(ID) ... as that will not do what you want and you'll 
corrupt your own data!

Best,
Kyle

P.S. Spam bot: database, row, query, mysql.

On Saturday 23 June 2001 11:07, xris wrote:
> So if the {mysql_insertid} thing is an issue, is there a fix?  Does the
> latest DBD/DBI package fix it?  Or is it strictly a MySQL issue and just
> needs to wait for a new release?
>
> As it is, it seems that:
>
> my ($id) = $dbh->selectrow_array("SELECT MAX(id) FROM tbl;");

Don't use this!!!


---------------------------------------------------------------------
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