I'm trying to do a function that get the skill value from the database, but I don't have much knowledge about sql, so I need this help. My MySQL version is 5.5
Thanks in advance.
Lua:
function getSkill (cid, skill)
local pid = getPlayerGUID(cid)
db.getResult("SELECT `value` FROM `player_skills` WHERE `player_id` = " ..pid.. " and `skillid` = ".. skill ..",")
return true
end
Thanks in advance.