Getting last row / auto_increment..

From: Date: Mon, 03 Jul 2000 13:26:07 +0000
Subject: Getting last row / auto_increment..
Groups: php.db 
Request: Send a blank email to php-db+get-824@lists.php.net to get a copy of this message
I have a database where the ID field is in the form XXYYYY, where XX is a couple of letters, and YYYY is a numerical value, which needs to increment by 1 for each entry. Since there is text being used in this field, I can't make it auto_increment.. what would be the best way to handle this then? How can I grab the last value? All I can think of is cutting off the YYYY using substr, then adding 1 to the YYYY value. I need to know how to get the last row in the table though first.. of course there might be an easier way too, so any advice would be appreciated :) Chad Day Beach Associates When I speak german... I think german in my head... but like...Do skript kiddies see a w40l3 8uncha 1's and 0's and 3's and 4's and 7's in their h34d'5 w43n t43y R +a1k1n6 ? -- SirStanley

« previous php.db (#824) next »