26.06.2016, 10:37
Hi guys, I have problem /w MySQL data saving.
My code is:
//POCETKICK - Kick count
//POCETJAIL - Admin jail count
//POCETBAN - Ban count
//NAHRANEHODINY - Played hours
//NAHRANEMINUTY - Played minutes
//PERMLEVEL - PERMISSION level
//Helper - is player helper
//Moderator - is player moderator
//Mince - something like money
//BankMoney - money on bank account
//BankAccNumber - bank account number
//Skin - actual skin
//Zivot - health
//Vesta - armour
//Hunger - hunger
Error is:
Please help me guys, I cant find the bug by five day... :/
My code is:
Код:
format(Query, sizeof(Query), "UPDATE `user_data` SET `PocetKick` = '%d', `PocetJail` = '%d', `PocetBan` = '%d', `NahraneHodiny` = '%d', `NahraneMinuty` = '%d', `PermLevel` = '%d', `Helper` = '%d', `Moderator` = '%d', `Mince` = '%d', `BankMoney` = '%d', `BankAccNumber` = '%d', `Skin` = '%d', `Zivot` = '%f', `Vesta`, = '%f', `Hunger` = '%d' WHERE `Username` = '%s'", playerInfo[playerid][2], playerInfo[playerid][3], playerInfo[playerid][4], playerInfo[playerid][5], playerInfo[playerid][6], playerInfo[playerid][7], playerInfo[playerid][8], playerInfo[playerid][9], playerInfo[playerid][10], playerInfo[playerid][12], playerInfo[playerid][13], playerInfo[playerid][11], dat[0], dat[1], playerInfo[playerid][14], ReturnName(playerid)); //Formбtujeme Query mysql_query(Query); //Odosielame mysql_free_result();
//POCETJAIL - Admin jail count
//POCETBAN - Ban count
//NAHRANEHODINY - Played hours
//NAHRANEMINUTY - Played minutes
//PERMLEVEL - PERMISSION level
//Helper - is player helper
//Moderator - is player moderator
//Mince - something like money
//BankMoney - money on bank account
//BankAccNumber - bank account number
//Skin - actual skin
//Zivot - health
//Vesta - armour
//Hunger - hunger
Error is:
Код:
[Sun Jun 26 11:50:24 2016] Error (0): Failed to exeute query. 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 ' = '0.000000', `Hunger` = '88' WHERE `Username` = 'Bastiaan_Viltuautas'' at line 1.