SA-MP Forums Archive
MySQL - ConnectionHandle Error. - 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 - ConnectionHandle Error. (/showthread.php?tid=464480)



MySQL - ConnectionHandle Error. - woadmull - 17.09.2013

I want to know, how to set ConnectionHandle ID/number, in mysql_query, because I have 2 different querys, one for Player Stats and one for Personal Cars...
Quote:

Errors in mysql debug file: mysql_query( Connection handle: 2 )
mysql_query() - Invalid connection handle. (You set: 2, Highest connection handle ID is 0).

Код:
(query[], resultid, extraid, connectionHandle)
I have "query", and "resultid", but if I want to skip "extraid", how do I do?
For example:"
Код:
    format(string, sizeof(string), "SELECT * FROM accounts WHERE Username = '%s'", account);
    mysql_query(string);
Cheers!


Re: MySQL - ConnectionHandle Error. - Eyce - 17.09.2013

pawn Код:
mysql_query(query[], resultid, 0, connectionHandle);



Re: MySQL - ConnectionHandle Error. - woadmull - 17.09.2013

EDIT: I solved that, but now I get those errors:

Quote:

mysql_query( Connection handle: 1 )
mysql_query() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0).
mysql_store_result( Connection handle: 1 )
mysql_store_result() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0).
mysql_num_rows( Connection handle: 1 )
mysql_num_rows() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0).
mysql_free_result( Connection handle: 1 )
mysql_free_result() - Invalid connection handle. (You set: 1, Highest connection handle ID is 0).