排序查询的desc或asc日期失败:(
我应该如何进行SQL查询?
请你能帮忙吗?

$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 ");

关于php - MySQL日期格式排序错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21904143/

10-12 23:10