From: Martijn Tonies Date: October 4 2004 9:03am Subject: Re: MySQL Order by 2 date fields List-Archive: http://lists.mysql.com/mysql/173559 Message-Id: <018701c4a9f0$fa7abf10$0a02a8c0@martijn> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hello, > I have two date fields (1095689105) in mysql. One is Creation date and > other is Modify date. If news is not modified its value is 0. How can I > sort my news so modify date is more important (if exists) than creation > date? What about an ORDER BY with a CASE statement that uses the CreationDate if ModifyDate = 0 and ModifyDate if it's <> 0. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com