MySQL error - when load the function mysql_fetch_row
#1

hello, I'm have one problem with MySQL lib, the code is this:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext,"/mysql", true) == 0)
 {
    new query[200],email[200],pName[200],result[500];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(query,sizeof(query),"SELECT * FROM players WHERE Nome='%s'",pName);
    mysql_query(query);
		mysql_store_result();
		mysql_fetch_row(query);
  		mysql_fetch_field_row(email,"EMail");
		format(result,sizeof(result),"Query: %s Nick: %s Result: %s",query,pName,email);
    SendClientMessage(playerid, COR_LARANJA, result);
    return 1;
 }
this is one part of code, look at the line that have 'mysql_fetch_row', when it is loaded by server, the server crashes.. someone knows this problem?

the file mysql_log return this:
[23:43:57] >> mysql_fetch_field_row( Connection handle: 1 )

[23:43:57] CMySQLHandler::FetchField("EMail") - email@live.com

see? without errors.. but the server still falls.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)