MySQL Error.
#1

Hi guys, I have problem /w MySQL data saving.

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();
//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:

Код:
[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.
Please help me guys, I cant find the bug by five day... :/

[Image: 6zmzSs]
Reply
#2

PHP код:
format(Querysizeof(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(); 
just , problem try above code
Reply
#3

thanks mate, rep+, i am dumb..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)