06.08.2018, 13:11
How can I implement this into a string? I want players to be able to see their registration date on /stats.
PlayerInfo[playerid][Year] = cache_get_field_content_int(i, "Year", gMySQL);
PlayerInfo[playerid][Month] = cache_get_field_content_int(i, "Month", gMySQL);
PlayerInfo[playerid][Day] = cache_get_field_content_int(i, "Day", gMySQL);
format(string, sizeof(string), "Registration Date: [%02d/%02d/%02d]\n",
gStr2, PlayerInfo[playerid][Year], PlayerInfo[playerid][Month], PlayerInfo[playerid][Day]);
You can have an example..
LoadPlayerDataFromSQL PHP код:
PHP код:
|
SELECT CONVERT(varchar, REGDATE, 1) FROM ... WHERE ...
Linking me to this page is practically useless information, I need EXAMPLES of how to adapt this knowledge to PAWN - perhaps some people would make sense of that information but me being new to it all I could do with some pointers.
|
SELECT DATE_FORMAT(REGDATE, '%M %d, %Y %H:%i:%s') AS reg_date FROM ...
Do I run this query within the stats command? Then how do I pull the result into the string? That's what I'm asking. Thanks for any pointers.
|
new date[20]; cache_get_value_index(0, 0, date, sizeof(date)); // row 0, column 0