SA-MP Forums Archive
Loading Date - 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: Loading Date (/showthread.php?tid=650387)



Loading Date - Oficer - 26.02.2018

Hi, my database has:
|Nick|Password|DateRegistered|
|Oficer|213134332|2018-02-26|

And I want share 'DateRegistered' in dialog.
PHP код:
 cache_get_?(0"DateRegistered"Player[playerid][DateRegistered]); 
Which variable use to date?


Re: Loading Date - Cypress - 26.02.2018

What are you currently saving; timestamp or plain data in a string? If it's a string it'd have to be loaded normally with the cache_get_value_name assuming you're variable is also set as string. If it's a timestamp it'd have to be converted in date format. I recommend using current timestamps as they are easier to deal with that kind of thing you want to achieve.

https://sampwiki.blast.hk/wiki/MySQL/R40...get_value_name

If interested about the timestamps https://sampforum.blast.hk/showthread.php?tid=254915%5D