SA-MP Forums Archive
Small MYSQL updating not working? - 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)
+--- Thread: Small MYSQL updating not working? (/showthread.php?tid=335262)



Small MYSQL updating not working? - Nuke547 - 17.04.2012

Fixed.


Re: Small MYSQL updating not working? - Nuke547 - 17.04.2012

Updated.


Re: Small MYSQL updating not working? - MP2 - 17.04.2012

Please do not bump within 24 hours.

As for your code - debug it with print(f) to see what is getting called, and check your mysql_log.


Re: Small MYSQL updating not working? - Nuke547 - 17.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Please do not bump within 24 hours.

As for your code - debug it with print(f) to see what is getting called, and check your mysql_log.
Sorry about the bump. Didn't mean it like that. I don't have a mysql_log, and what do you want me to put with the print(f)?


Re: Small MYSQL updating not working? - PrawkC - 17.04.2012

Enable debug for MySQL, for BlueG's plugin its mysql_debug(true);


Re: Small MYSQL updating not working? - Skribblez - 17.04.2012

Add mysql_debug(1); under OnGameModeInit, this will automatically log everything especially on queries and save it into a text file(Debug.txt) and you'll see what's wrong with your code.


Re: Small MYSQL updating not working? - Nuke547 - 17.04.2012

Here is the error it states.

pawn Код:
Query(UPDATE accounts SET group = 1 WHERE name = 'Billy_Bob') - An error has occured. (Error ID: 1064, 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 'group = 1 WHERE name = 'Billy_Bob'' at line 1)



Re: Small MYSQL updating not working? - kikito - 17.04.2012

pawn Код:
format(query, sizeof(query), "UPDATE `accounts` SET group = '%d' WHERE name = '%s'", value, GetName(playerid));
That's it (: