Re: PHP + MySQL - Load last inserts

From: Date: Mon, 30 Mar 2009 14:13:33 +0000
Subject: Re: PHP + MySQL - Load last inserts
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-290830@lists.php.net to get a copy of this message
haliphax schrieb:
[..cut...]
Except when your primary key value rolls over, or fills a gap between two other rows that was left when a row was deleted/moved/etc... there has got to be a better way than grabbing rows in descending order based on the auto_increment value. Are you doing the inserts one at a time? If so, why not just use code to remember what you put in the DB? I do the inserts one at a time, i could use code to remember but i think it would be very slow when i have too much users.
The second thing that aware me from doing this is, why use/build ressources when you could use others? i think why should i use and add another system? I work with mysql already and when php+mysql have the function i need it's better and i don't waste ressources :)

« previous php.general (#290830) next »