[SQL] Updating
#2

Delete , before WHERE and when you are saving numbers ' ' are useless and every column has to be betwen ` `
Correct code:
pawn Код:
format(query, sizeof(query), "UPDATE `players` SET `jskill` = %d,`mskill` = %d,`dskill` = %d ,`fskill` =  %d WHERE `id` = %d LIMIT 1",PlayerInfo[playerid][jskill],PlayerInfo[playerid][mskill],PlayerInfo[playerid][dskill],PlayerInfo[playerid][fskill],PlayerInfo[playerid][SQLID]);
I also added Limit to prevent affecting multiple rows
Reply


Messages In This Thread
[SQL] Updating - by Dj_maryo1993 - 04.05.2013, 19:40
Re: [SQL] Updating - by [MG]Dimi - 04.05.2013, 20:10
Re: [SQL] Updating - by Dj_maryo1993 - 04.05.2013, 20:50

Forum Jump:


Users browsing this thread: 1 Guest(s)