SA-MP Forums Archive
Mysql update 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)
+--- Thread: Mysql update problem (/showthread.php?tid=423800)



Mysql update problem - PaulDinam - 19.03.2013

I want to update every single user, when i'm starting the gamemode.
this is my code:

pawn Код:
new query[256];
    format(query, sizeof(query), "UPDATE `users` SET `vehkey` = %d, `vehslot` = %d", 0, 0);
    mysql_function_query(dbHandle, query, true, "", "");



Respuesta: Mysql update problem - Xabi - 19.03.2013

Check that the columns' name is correct and try this:

pawn Код:
mysql_function_query(dbHandle, query, false, "", "");



Re: Mysql update problem - B-Matt - 19.03.2013

mysql_function_query(dbHandle, query, false, "", "");
read this: https://sampforum.blast.hk/showthread.php?tid=337810

Xabi was faster >.<


Re: Mysql update problem - PaulDinam - 19.03.2013

You both we're wrong..
format(query, sizeof(query), "UPDATE `users` SET `vehkey` = %d, `vehslot` = %d", 0, 0);
this was wrong, and i've fixed it.


Re: Mysql update problem - Misiur - 19.03.2013

Nope, they are not wrong - you might crash a server when telling plugin that you have a callback, but then not providing a function (of course if there aren't any crash protectors implemented in blueg plugin)


Re: Mysql update problem - Scenario - 19.03.2013

By the way, you have caching enabled when you aren't even using it.

Change "true" to "false" on the mysql_function_query() line. And as the others have said, you're likely to crash your server when having an empty callback specified.


Re: Mysql update problem - Vince - 19.03.2013

I've never experienced crashes with empty callbacks. I use empty callbacks all the time for writing logs and stuff.