MySQL problem
#5

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Like it's setting everyone's column the same, the column "TrashMasterMissions"
pawn Код:
static gQuery[60];
    format(gQuery,sizeof gQuery,"UPDATE `Accounts` SET `TrashMasterMissions` = '%i' WHERE `ID` = '%i' LIMIT 1;",PInfo[playerid][TrashMasterMissions],PInfo[playerid][ID]);
    mysql_query(gQuery);
For starters the syntax is wrong, I mean, drop the ' around integer values, '' are used to enclose strings, just use %i, or %d. Then print the ID to see if there's anything wrong that might set the same values for every user.
Oh and, stop using static keyword for mysql queries, use new to declare a new variable.
Reply


Messages In This Thread
MySQL problem - by FireCat - 28.07.2012, 15:56
Re: MySQL problem - by Sanady - 28.07.2012, 16:00
Re: MySQL problem - by FireCat - 28.07.2012, 16:01
Re: MySQL problem - by Sanady - 28.07.2012, 16:05
Re: MySQL problem - by Virtual1ty - 28.07.2012, 16:10
Re: MySQL problem - by FireCat - 28.07.2012, 16:13
Re: MySQL problem - by Virtual1ty - 28.07.2012, 16:14
Re: MySQL problem - by FireCat - 28.07.2012, 16:17
Re: MySQL problem - by Virtual1ty - 28.07.2012, 16:20

Forum Jump:


Users browsing this thread: 4 Guest(s)