DATE_FORMAT null
#1

So, I have this query


PHP код:
mysql_format(sqlConnectionquerysizeof(query), "SELECT *, DATE_FORMAT(lastlogin, '%%e/%%c/%%Y') AS date_time FROM players WHERE username = '%e' AND password = '%e'"GetPlayerNameEx(playerid), password);
mysql_tquery(sqlConnectionquery"OnQueryFinished""ii"THREAD_ACCOUNT_LOGINplayerid 
PHP код:
new date[64];
cache_get_field_content(0"date_time"datesqlConnection64); 
PHP код:
SendClientMessageEx(playerid, -1"Your last login was on the %s"date); 
it shows me NULL when the player spawn, I'm not sure what is wrong with it, any ideas ?
Reply
#2

Print the query. I suspect the mysql_format function is getting confused with those extra percent signs.
Reply
#3

PHP код:
SELECT *, DATE_FORMAT(lastlogin'e/ 
also

PHP код:
[15:13:28 05/09/17] [WARNINGCMySQLResult::GetRowDataByName field not found ("date_time") (Query"SELECT * FROM players WHERE id = 4 LIMIT 1"
Reply
#4

PHP код:
specifiers[] = "%%D of %%M, %%Y @ %%k:%%i"
PHP код:
mysql_format(sqlConnectionquerysizeof(query), "SELECT *, DATE_FORMAT(lastlogin, '%e') AS date_login FROM players WHERE username = '%e' AND password = '%e'"specifiersGetPlayerNameEx(playerid), password); 
print:

PHP код:
SELECT *, DATE_FORMAT(lastlogin'%D of %M, %Y @ %k:%i') AS date_login FROM players WHERE username etc... 
No values assign to it ?
Reply
#5

bump
Reply
#6

Show more info, database screenshot with lastlogin type and create table
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)