Another query problem.
#1

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);
Reply
#2

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.
Reply
#3

By bad misunderstood. Try new ban[128];
Reply
#4

How do i miss so simple a problem?
Reply
#5

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

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.
Reply
#7

Thanks for the correction.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)