arheon
Own3d PlAx.'?
- Joined
- Aug 31, 2009
- Messages
- 92
- Reaction score
- 3
[SOLVED]
Noobish question but anyway there i go :
I want to call query and if there's no such row (return 0) then function returns false and if there's row then function returns true
But somehow i keep getting :
From every function i use from 04-database.lib (getRows,getDataInt,etc)
Example :
This one gives error [Result:getRows] Result not set !
Query works correctly in phpmyadmin -> SQL (It doesn't return error)
Noobish question but anyway there i go :
I want to call query and if there's no such row (return 0) then function returns false and if there's row then function returns true
But somehow i keep getting :
Code:
Result not Set
Example :
Lua:
function accountStorageExists(cid,key)
local storage = db.getResult("SELECT * FROM `accounts_storage` WHERE (`id` = '" .. getPlayerAccountId(cid) .. "' and `key` = '" .. key .. "');")
local rows = storage:getRows()
if rows == 1 then return true else return false end
end
Query works correctly in phpmyadmin -> SQL (It doesn't return error)
Last edited: