用于排序查询的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 ");
答案 0 :(得分:0)
$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 ");
试试这个。
答案 1 :(得分:0)
$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 ");
答案 2 :(得分:0)
将$tour_category_id[category_id]
更改为$tour_category_id["category_id"]