i hope to find help here
am facing a problem with retrieving some data from my DB with SELECT query
am doing a Quest that needs to check Pet level before updating its parameters
the new_petsystem table in DB looks like
Code:
id | name | level | evolution | exp | expi | bonus0 | bonus1 | bonus2 | skill0 |skill0lv etc
like this :
Code:
mysql_direct_query(string.format("UPDATE player.new_petsystem SET level = 82, evolution = 3, exp = 0, expi = 0, bonus0 = 95, bonus1 = 95, bonus2 = 95 WHERE id = %d;", item.get_id()));
i trid many ways like "
Code:
local lvlCheck = mysql_direct_query("SELECT level FROM player.new_petsystem WHERE id = "..item.get_id().."; ")
Code:
syschat(" result is : "..lvlCheck.." ")
some times it shows me nil result . some times it shows me some big number that i dont know where it came from
hope if any one can help me of the right way to retrieve values from DB and store it in a variable to use it in my quest
thanks in advance






