Hi,
Anyone can tell me how should I compare a result of a line on DB to null?
For example:
db.getResult("SELECT `id` FROM `accounts` WHERE `id` = "74712885";")
This will return NULL on mysql, how should I verify this with an if?
I'm trying like this:
local status = db.getResult("SELECT `id` FROM `accounts` WHERE `id` = "74712885";")
if status == 0 then
xxx
end
And I can't.
I didn't find this in any place, can anyone help me?
Sorry for my bad english, i'm from Brazil.
Thanks!
Anyone can tell me how should I compare a result of a line on DB to null?
For example:
db.getResult("SELECT `id` FROM `accounts` WHERE `id` = "74712885";")
This will return NULL on mysql, how should I verify this with an if?
I'm trying like this:
local status = db.getResult("SELECT `id` FROM `accounts` WHERE `id` = "74712885";")
if status == 0 then
xxx
end
And I can't.
I didn't find this in any place, can anyone help me?
Sorry for my bad english, i'm from Brazil.
Thanks!