SA-MP Forums Archive
Another query problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Another query problem. (/showthread.php?tid=244912)



Another query problem. - Rokzlive - 29.03.2011

Whats wrong with this? I suck at mysql strings.

pawn Код:
new ban[50];
                        format(ban,sizeof(ban),"UPDATE `accounts` SET `Warns`= 3 WHERE name = '%s'",pName2);
                        mysql_query(ban);



Re: Another query problem. - Donya - 29.03.2011

pawn Код:
new Query[80];
format(Query,sizeof(Query),"UPDATE `accounts` SET `Warns` = 3 WHERE `name` = '%s'",pName2);
mysql_query(Query);
Query length problem, no biggy.


Re: Another query problem. - XFlawless - 29.03.2011

By bad misunderstood. Try new ban[128];


Re: Another query problem. - Rokzlive - 29.03.2011

How do i miss so simple a problem?


Re: Another query problem. - XFlawless - 29.03.2011

Quote:
Originally Posted by Rokzlive
Посмотреть сообщение
How do i miss so simple a problem?
Next time check your mysql log


Re: Another query problem. - Calgon - 29.03.2011

Quote:
Originally Posted by XFlawless
Посмотреть сообщение
By bad misunderstood. Try new ban[128];
...and you need to wrap ` around EVERY field name you use if you use ` once in a query.


Re: Another query problem. - XFlawless - 29.03.2011

Thanks for the correction.