Couldn't something like this work? SELECT id,foo,bar FROM tbl ORDER BY id DESC LIMIT 1
Thanks, Ryan Yagatich ,_____________________________________________________, \ Ryan Yagatich [EMAIL PROTECTED] \ / Pantek Incorporated (877) LINUX-FIX / \ http://www.pantek.com/security (440) 519-1802 \ / Are your networks secure? Are you certain? / \___37AD0283C6E7B51D5C0610E5C5F103776D2C520B0B0B9E58___\ On Mon, 9 Jun 2003, Chris Edwards wrote: >Hi > >Does anyone have tips on the fastest way to get the last row in a table. > >What I have is an int as the the primary key, using auto inc. > >I currently do a select max(id), then run another query retrieving a row >based on the the max(id). > >Its two queries. > >Would I be able to get it all into one? > >Not using mysql 4... > >Thanks. > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]