MySQL get value? - 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 get value? (
/showthread.php?tid=612079)
MySQL get value? -
TracerX - 13.07.2016
removed
Re: MySQL get value? -
OneDay - 14.07.2016
use stored procedure
Re: MySQL get value? -
Shady - 14.07.2016
Just create a variable which store the peak when server starts, also create a timer and then check if the peak has changed or not. If changed, then update MySQL.
Re: MySQL get value? -
[cS]Owain - 14.07.2016
Try this, not tested but it will work AFAIK :
PHP код:
"update `server`
set onlineplayerpeak= CASE WHEN `online`+ 1 > onlineplayerpeak THEN `online`+ 1 ELSE onlineplayerpeak END,
online = online +1"