[英]MySQL date format sort error
排序查詢的desc或asc日期失敗:(
我應該如何進行mSQL查詢?
請你能幫忙嗎?
$tours = mysql_query("SELECT * FROM tours WHERE tour_category_id='".$tour_category_id[category_id]."' AND tour_status='Aktif' ORDER BY kayit_tarihi DESC ");
$someVariable = $tour_category_id[category_id];
$tours = mysql_query("SELECT * FROM tours WHERE tour_category_id='$someVariable' AND tour_status='Aktif' ORDER BY kayit_tarihi DESC ");
嘗試這個。
$tours = mysql_query("SELECT *
FROM tours
WHERE tour_category_id='".$tour_category_id[category_id]."'
AND tour_status='Aktif'
ORDER BY tour_category_id DESC ");
將$tour_category_id[category_id]
更改$tour_category_id[category_id]
$tour_category_id["category_id"]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.