Gettime doesnt save in MYSQL - 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: Gettime doesnt save in MYSQL (
/showthread.php?tid=649686)
Gettime doesnt save in MYSQL -
PepsiCola23 - 13.02.2018
PHP код:
PlayerData[playerid][TimeTruck] = gettime();
new str[128];
mysql_format(SQL, str,128,"UPDATE `users` SET `TruckTime`='%d' WHERE `id` = '%d' LIMIT 1",PlayerData[playerid][TimeTruck],PlayerData[playerid][ID]);
mysql_tquery(SQL, str, "", "");
i want to save the gettime so a player can use a cmd every 6 hours.
this is the save code,but in the table it always says NULL-doesn`t change.
Re: Gettime doesnt save in MYSQL -
FaLLenGirL - 13.02.2018
Well in the table you must have something like this:
[ this is the way i save last time or something when i use gettime( ) ]
Re: Gettime doesnt save in MYSQL -
PepsiCola23 - 13.02.2018
i solved it,i misstyped timetruck with trucktime