Mysql update problem
#1

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

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

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

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

Xabi was faster >.<
Reply
#4

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

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)
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)