结构是:
CREATE TABLE stopsbuses (_id INTEGER PRIMARY KEY, stop_id NUMERIC, bus_id NUMERIC, drive TEXT, day TEXT);
CREATE TABLE stopsbusestimes (_id INTEGER PRIMARY KEY, sb_id NUMERIC, timeh NUMERIC, timem NUMERIC);
当我执行这样的查询时:
SELECT timeh, timem FROM stopsbuses
INNER JOIN stopsbusestimes ON stopsbuses._id = stopsbusestimes.sb_id
WHERE stopsbuses.stop_id = 2 ORDER BY timeh asc, timem asc
输出例如是:
[..]
7 1
7 31
7 34
7 54
7 57
7 22
[..]
相同的输出很简单:
SELECT timeh, timem FROM stopsbusestimes ORDER BY timeh, timem
使用php + pdo,SQLite数据库浏览器和Android应用程序输出相同的输出。
我错过了两列排序的东西吗?