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" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 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