[GLLUG] mysql help

Adam Kendall ack@msu.edu
Thu, 27 Jun 2002 15:02:52 -0400


I'm trying to select the last row in a table...can anyone provide some help
with this.

something like...  SELECT last_row FROM $table  or SELECT * FROM $table
WHERE last_row

I realize that this isn't the proper syntax...any help would be appreciated.
Maybe you can actually come up with a better way of doing what I'm trying to
do.  I am entering info into a table from a web-based form with PHP.  The
table has an ID field which is auto_increment.  I need to get the ID value
of the row that was just entered by the current script, later in the script.
It _should_ be the last row in the table and that's why I'm trying to
extract it that way...I'm sure there must be a better way to do this.
Thanks in advance for the help!

-Adam