0
我想从当前数据库中所有表及其列的列表,如:获得从sqlite的DB信息架构
table1
- column1
- column2
- column3
table2
- column1
- column2
我想:
SELECT * FROM sqlite_master WHERE type=? ORDER BY name;
(?
是'table'
)
但我只得到表列表,没有列:(
如果我删除了WHERE子句我得到这个错误:
SQLSTATE[HY000]: General error: 25 bind or column index out of range
如果我更换table
与column
我什么也得不到......
帮助吗?
我得到的25错误 – Alex 2012-02-11 22:02:14
你在PHP中使用的SQLite PDO? – iDifferent 2012-02-11 22:07:37
是的。但它现在有效,问题是我的查询包装函数没有传递正确的参数:) – Alex 2012-02-11 22:10:55