Re: PHP + MySQL - Load last inserts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




The physical order of the rows changed (as you can see) but it does not
re-use the id's that were deleted.

Ordering by the id will get you the last bunch inserted.

If you're using innodb you'll have to be aware it's transaction specific, if
you're using myisam it will be system wide.

I'll have to check my DBs then, because the exact situation I
described happened to me a few years back when I was first getting
into the DB scene. Regardless, I'm fairly certain the MSSQL box we
have at work behaves this way.

Maybe it's a version thing, that test was done on mysql 5 (I'm sure it'll work on mysql 4.0/4.1 as well). No idea about ones before that.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux