我有這個輸入。在mysql查詢中按名稱,日期,日期排序?
October 21 , 2010
October 14 , 2007
October 08 , 2010
March 19 , 2009
June 25 , 2009
June 21 , 2013
June 21 , 2013
June 19 , 2006
June 01 , 2009
July 26 , 2013
July 25 , 2012
July 23 , 2013
July 19 , 2013
July 01 , 2009
January 31 , 2013
January 23 , 2013
January 23 , 2011
January 19 , 2013
January 01 , 2000
February 17 , 2011
February 16 , 1998
December 25 , 2003
August 31 , 2013
August 04 , 2013
August 03 , 2013
August 03 , 2013
August 03 , 2013
April 26 , 2013
April 26 , 2013
April 19 , 2005
我想訂購,使最新的日期是在頂部..但我似乎無法做到這一點,有人可以提供一個解決方案?
這是我的SQL:
$sql = "SELECT * FROM $tbl_name WHERE Length(Year) > 7 AND `Title`
LIKE '%" . $q . "%' AND `Genres` LIKE '%" . $genre . "%' AND `Actors`
LIKE '%" . $actor . "%' AND `Year` <> 'Unknown'
ORDER BY `Year` DESC LIMIT $start, $limit";
所以你提到的日期來自3個不同的列? – DevelopmentIsMyPassion
和你的mysql查詢在哪裏? – Salil
'ORDER BY Year DESC,month DESC,day DESC' –