Re: Query for Most Recent Entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx> wrote in message
news:4B3F673172B98D449EBCC3BE8316F5240407D120@xxxxxxxxxxxxxxxxxx
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

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux