Update mysql info. - 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: Update mysql info. (
/showthread.php?tid=546036)
Update mysql info. -
TheINCDope - 12.11.2014
Hey is there a way to "load" certain table from the mysql?
I mean, if I set command for exemple unlock. and I set that if player unlocks the certain house or something unlocks in mysql so it updates the table.
But the problem is the samp server doesnt know that the value of unlock changed, so I need to refresh it somehow so the value changed.
Ill try to explain it more:
Код:
new Query[200];
format(Query, sizeof(Query), "UPDATE `houses` SET `hLocked` = 0 WHERE `hID` = %i", iHos[haI]);
mysql_query(Query);
mysql_free_result();
return 1;
this is the update command when player types unlock.
But when player does it, it works good, the table does update, the problem is that the server has old info.
So should I just load whole table set "houses" or is there a way to update only that row and is there any differenece will I somehow would overload server if there would be more players and they would lock it more than one person ?