SA-MP Forums Archive
MySQL Problem. - 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)
+--- Thread: MySQL Problem. (/showthread.php?tid=485027)



MySQL Problem. - Grumbles - 02.01.2014

Код:
[19:48:07] CMySQLHandler::EscapeString(Albert_Casamento); - Escaped 19 characters to Albert_Casamento.

[19:48:07] >> mysql_query( Connection handle: 1 )

[19:48:07] CMySQLHandler::Query(resultID) - Threaded query with id 3 started. (Extra ID: 8)

[19:48:07] >> mysql_query( Connection handle: 1 )

[19:48:07] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
How can I fix this problem?


Re: MySQL Problem. - McBan - 02.01.2014

CMySQLHandler::EscapeString(Albert_Casamento);
Connect(MySQL)::1


Re: MySQL Problem. - Grumbles - 02.01.2014

I can't understand what am I suppose to do? Can you explain a little bit in detail pretty please.


Re: MySQL Problem. - Grumbles - 02.01.2014

Код:
[20:26:17] CMySQLHandler::Query(UPDATE users SET Banned = '0', Second = '0', MainSkin = '1', Cash = '0', CashBank = '0', BankNO = '0', PayDay = '0' WHERE SQLID = '-1') - An error has occured. (Error ID: 2013, Lost connection to MySQL server during query)

[20:26:17] >> mysql_query( Connection handle: 1 )



Re: MySQL Problem. - Konstantinos - 02.01.2014

Add the public function OnQueryError into your mode (the parameters can be found in a_mysql.inc). Print the parameters.

For example, in R35:
pawn Код:
public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
    printf("OnQueryError(%i, \"%s\", \"%s\", \"%s\", %i)", errorid, error, callback, query, connectionHandle);
    return 1;
}
Also about the above post, look at the end: ... WHERE SQLID = '-1'
Don't you store the connection handle in a variable (assign the value mysql_connect returned to that variable) that you use it as parameter to those function is needed?


Re: MySQL Problem. - Grumbles - 02.01.2014

Код:
[21:01:20] EID: 2014 | Error: Commands out of sync; you can't run this command now | Query: SELECT `PhoneB` FROM `phones` WHERE `PhoneNO` = '10619'
[21:01:20] 
errorid: 2014 | error: Commands out of sync; you can't run this command now | resultid: -1 | extraid: -1 | callback: NULL | query: SELECT `PhoneB` FROM `phones` WHERE `PhoneNO` = '10619'