【发布时间】:2011-07-01 09:59:45
【问题描述】:
我用 Erlang 创建 sqlite db:
sqlite3:open(user_db, [in_memory]),
TableInfo = [{user, text, [not_null]}, {password, text, [not_null]}, {domain, text, [not_null]}],
ok = sqlite3:create_table(user_db, users, TableInfo)
我的桌子:
user password domain
shk qwerty localhost\
admin qwerty localhost\
我尝试选择名为 admin 的用户,例如:
sqlite3:sql_exec(user_db, "SELECT user FROM users WHERE user = shk;")
我得到错误:
=错误报告==== 2011 年 2 月 21 日::22:38:51 === sqlite3驱动错误:没有这样的列:shk
但是例如,如果我尝试:
sqlite3:sql_exec(user_db, "SELECT user FROM users WHERE password = qwerty;")
没关系。怎么了?
谢谢。
【问题讨论】: