Re: Query for Most Recent Entry
| From: | Chris | Date: | Fri, 02 Jul 2004 19:16:51 +0000 |
| Subject: | Re: Query for Most Recent Entry | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35112@lists.php.net to get a copy of this message | ||
Is the primary key field numerical? If so then you can try to use an sql
statement like: SELECT MAX(field) AS max_field FROM table GROUP BY max_field
Chris
"Jimi Thompson" <JimiT@mail.cox.smu.edu> wrote in message
news:4B3F673172B98D449EBCC3BE8316F5240407D120@exch4.elcsb.net...
Hi,
I'm trying to figure out how to write a MySQL query that will return the
highest primary key a table.
Thanks,
Ms. Jimi Thompson, CISSP
Manager, Web Operations
Cox School of Business
Southern Methodist University
"What kind of peace do we seek? Not a 'Pax Americana' enforced on the
world by American weapons of war. Not the peace of the grave or the
security of a slave. I am talking about genuine peace, the kind of peace
that makes life on earth worth living, the kind that enables men and
nations to grow and to hope and to build a better life for their
children-not merely peace for Americans, but peace for all men and
women; not merely peace in our time, but peace for all time." - John F.
Kennedy