簡體   English   中英

MySQL日期格式排序錯誤

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM