Drop the second ORDER BY clause in favor of a comma. ORDER BY table1.time_created DESC, table1.name LIMIT 50
Regards, Mike Hillyer www.vbmysql.com -----Original Message----- From: Dave Terrio [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 7:38 AM To: [EMAIL PROTECTED] Subject: nested ORDER BY statements Hello - I'm a relative newcomer to development with MySQL and am having a problem with ordering my query results... I first want to select the 50 most recently created records (with respect to my date field) and then order these with respect to another field (eg name). That way I'm always "ordering" the 50 most recent records. The problem is, I can't figure out how to do this - as MYSQl complains when I put 2 "ORDER BY" statements in a query such as in: order by table1.time_created desc limit 50 order by table1.name; Any suggestions? Thanks, -David -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]