SA-MP Forums Archive
MySQL error - when load the function mysql_fetch_row - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL error - when load the function mysql_fetch_row (/showthread.php?tid=140921)



MySQL error - when load the function mysql_fetch_row - Mandrakke - 11.04.2010

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.