mysql_function_querry Error.
#1

Im trying to get the MYSQL plugin to work, and i get the following errors:
Quote:

[15:42:16] >> mysql_query_callback( Connection handle: 0 )
[15:42:16] >> mysql_query_callback() - Invalid connection handle. (You set: 0, Highest connection handle ID is 0).

OnFilterScriptInit():


mysql_debug(1);
connection = mysql_connect("hostname","database","username","pa ss");
if(!mysql_ping())
{
print("[MYSQL]Connection Failed!");
}
else
{
print("[MYSQL]Connection Successful!");
}

OnPlayerConnect:

new string[128];
format(string,sizeof(string),"INSERT INTO test(test) VALUES('HI')");
mysql_function_query(connection,string, false, "OnQueryFinish", "siii");
Reply
#2

Hmm, I see you forgot some things. mysql_function_query has similar syntaxes as in CallLocalFunction. You didn't even define the values you include. Example:

pawn Код:
mysql_function_query(connection,string, false, "OnQueryFinish", "siii",SomeString,SomeInt,SomeOtherInt,SomeLastInt);
Understood?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)