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 ");
$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"]
$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 ");
试试这个。