I have a problem
function existsBetaKey (key)
local query = dbQuery ( handler, "SELECT * FROM betakeys WHERE Key=?",key )
result , numrows, errmsg = dbPoll (query, -1)
local row = result[1]
if row then
return true
else
return false
end
end
db.log error:
2013-07-20 16:06:46.840: [script] FAIL: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Key ='8201-2349-3772-3253'' at line 1 [Query:SELECT * FROM betakeys WHERE Key ='8201-2349-3772-3253']
console error:
[2013-07-20 16:06:46] WARNING: prox\beta\beta_s.lua:37: dbPoll failed; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Key ='8201-2349-3772-3253'' at line 1
[2013-07-20 16:06:46] ERROR: prox\beta\beta_s.lua:38: attempt to index global 'result' (a boolean value)
db: