I am creating sqlite db with Erlang:
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)
My table:
user password domain
shk qwerty localhost\
admin qwerty localhost\
I am trying to select user whch name admin, for example:
sqlite3:sql_exec(user_db, "SELECT user FROM users WHERE user = shk;")
I get an error:
= REPORT ERROR ==== 21-Feb-2011 :: 22: 38: 51 === sqlite3 driver error: there is no such column: shk
But, for example, if I try:
sqlite3:sql_exec(user_db, "SELECT user FROM users WHERE password = qwerty;")
this is normal. What's wrong?
Thank.
source
share