[thelist] SELECTing and auto_increment field

Jackson Miller anything at jaxn.org
Thu Sep 13 18:04:15 CDT 2001


My solution was to use a separate, two-column table that contains the id of
the last record edited, and the name of the table it comes from. I update
that last_id field at the end of every INSERT or UPDATE. Then I select it
using the appropriate table name whenever I need to refer to it. Seems
convoluted, but it works.

Is there a simpler solution? I did rtfm, but didn't find anything.


Why not just add a column of the timestamp type.  It will automatically
adjust the value any time the field is updated (or inserted).  Then you just
search for the most recent time.

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !





More information about the thelist mailing list