[Ajuda] Duvida sobre MySql
#1

Olб !

Eu comeзei a estudar MySql ontem de noite, e terminei de criar meu sistema de login e registro hoje, estou conseguindo puxar todos meus dados da tabela, mas quando fui puxar a data de um campo varchar(100) ele nгo me retorna nada, exemplo:

pawn Код:
enum pInfo{
    pUltimoLogin
};
new PlayerInfo[MAX_PLAYERS][pInfo], StrFormat[126];
Fields:


Setando o content do campo na variavel...
pawn Код:
cache_get_field_content(0,"pUltimoLogin",Query);
PlayerInfo[playerid][pUltimoLogin] = strval(Query);
Formatando..
pawn Код:
format(StrFormat, sizeof(StrFormat), "Ultimo login: %s", PlayerInfo[playerid][pUltimoLogin]); // Em forma de strings, nгo sei se estб correto
SendClientMessage(playerid, -1, PlayerInfo[playerid][pUltimoLogin]);
Verifiquei no mysql_log.txt e tem isto:
Код:
[17:42:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:42:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:42:03] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[17:42:03] [DEBUG] CMySQLConnection::Connect - connection was successful
[17:42:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[17:42:03] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
Ao spawnar...
Код:
[17:45:10] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE name='Clandok'", callback: "r@MySQL_CheckAccount", format: "d"
[17:45:10] [DEBUG] CMySQLQuery::Execute[r@MySQL_CheckAccount] - starting query execution
[17:45:10] [DEBUG] CMySQLQuery::Execute[r@MySQL_CheckAccount] - query was successfully executed within 2.407 milliseconds
[17:45:10] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[17:45:10] [DEBUG] Calling callback "r@MySQL_CheckAccount"..
[17:45:10] [DEBUG] cache_get_data - connection: 1
[17:45:10] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[17:45:13] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE name='Clandok' AND password='1234'", callback: "r@MySQL_CheckPassword", format: "d"
[17:45:13] [DEBUG] CMySQLQuery::Execute[r@MySQL_CheckPassword] - starting query execution
[17:45:13] [DEBUG] CMySQLQuery::Execute[r@MySQL_CheckPassword] - query was successfully executed within 3.542 milliseconds
[17:45:13] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[17:45:13] [DEBUG] Calling callback "r@MySQL_CheckPassword"..
[17:45:13] [DEBUG] cache_get_data - connection: 1
[17:45:13] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `users` WHERE name='Clandok'", callback: "r@MySQL_LoadAccount", format: "d"
[17:45:13] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[17:45:13] [DEBUG] CMySQLQuery::Execute[r@MySQL_LoadAccount] - starting query execution
[17:45:13] [DEBUG] CMySQLQuery::Execute[r@MySQL_LoadAccount] - query was successfully executed within 0.951 milliseconds
[17:45:13] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[17:45:13] [DEBUG] Calling callback "r@MySQL_LoadAccount"..
[17:45:13] [DEBUG] cache_get_data - connection: 1
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "level", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "level", data: "200"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "admin", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "admin", data: "1"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "money", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "money", data: "1500"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "bank", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "bank", data: "0"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "skin", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "skin", data: "10"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "pUltimoLogin", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "pUltimoLogin", data: "08/01/2015"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "m_jogados", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "m_jogados", data: "616"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "PosX", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosX", data: "680.01"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "PosY", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosY", data: "1498.003"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "PosZ", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosZ", data: "8.886"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "CamX", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CamX", data: "676.445"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "CamY", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CamY", data: "1499.687"
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "CamZ", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CamZ", data: "10.218"
[17:45:13] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
No log pareзe que pega o content do campo "pUltimoLogin"
Код:
[17:45:13] [DEBUG] cache_get_field_content - row: 0, field_name: "pUltimoLogin", connection: 1, max_len: 500
[17:45:13] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "pUltimoLogin", data: "08/01/2015"
Serб que tenho que limpar o cache ?
Quem poder ajudar eu agradeзo.
Reply


Messages In This Thread
Duvida sobre MySql - by CLANdok - 08.01.2015, 19:05
Re: Duvida sobre MySql - by mau.tito - 08.01.2015, 19:15
Re: Duvida sobre MySql - by CLANdok - 08.01.2015, 19:19
Re: Duvida sobre MySql - by WLSF - 08.01.2015, 19:45
Re: Duvida sobre MySql - by CLANdok - 08.01.2015, 19:48
Re: Duvida sobre MySql - by WLSF - 08.01.2015, 20:09
Re: Duvida sobre MySql - by CLANdok - 08.01.2015, 20:14
Re: Duvida sobre MySql - by WLSF - 08.01.2015, 20:22
Re: Duvida sobre MySql - by CLANdok - 08.01.2015, 20:28

Forum Jump:


Users browsing this thread: 1 Guest(s)