0
我想根據自己的時間在上升爲了顯示我的表。如何按照時間排序的MySQLi表ASC爲了
表樣本:
+------+----------+-----+
| id | time | val |
+------+----------+-----+
| 1 | 01:22 AM | a |
+------+----------+-----+
| 2 | 03:12 PM | b |
+------+----------+-----+
| 3 | 07:21 AM | c |
+------+----------+-----+
| 4 | 01:52 PM | d |
+------+----------+-----+
| 5 | 07:40 PM | e |
+------+----------+-----+
應當安排從 - AM到PM爲了
a - 01:22 AM
c - 07:21 AM
d - 01:52 PM
b - 03:12 PM
e - 07:40 PM
表不日期 - 時間格式它只是在VARCHAR
您的數據庫名爲mysql,不是的mysqli – 2013-02-22 16:43:59
這個答案,從Omesh,應該可以幫助你; http://stackoverflow.com/a/12952663/297243 – Tom 2013-02-22 16:45:34