21.01.2013, 13:31
Quote:
[16:45:12] >> mysql_format( Connection handle: 76 ) [16:45:12] >> mysql_format() - Invalid connection handle. (You set: 76, Highest connection handle ID is 1). [16:45:12] >> mysql_query_callback( Connection handle: 76 ) [16:45:12] >> mysql_query_callback() - Invalid connection handle. (You set: 76, Highest connection handle ID is 1). [16:45:31] >> mysql_format( Connection handle: 76 ) [16:45:31] >> mysql_format() - Invalid connection handle. (You set: 76, Highest connection handle ID is 1). [16:45:31] >> mysql_query_callback( Connection handle: 76 ) [16:45:31] >> mysql_query_callback() - Invalid connection handle. (You set: 76, Highest connection handle ID is 1). [16:45:31] >> mysql_close( Connection handle: 76 ) [16:45:31] >> mysql_close() - Invalid connection handle. (You set: 76, Highest connection handle ID is 1). |
pawn Код:
stock ConnectToMySQL()
{
mysqlHandle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DB, MYSQL_PASS);
mysql_debug(true);
printf("Handle # OGI # 1: %d", mysqlHandle);
if (mysqlHandle > 0)
{
// connect success
printf("Handle # OGI # 2: %d" mysqlHandle);
}
else
{
// something wrong with the connection
printf("Handle # OGI # 3: %d", mysqlHandle);
SendRconCommand("exit");
return (true);
}
printf("Handle # OGI # 4: %d", mysqlHandle);
return (true);
}
pawn Код:
public OnPlayerConnect(playerid)
{
printf("Handle # OPC # 1: %d", mysqlHandle);
<...> code
printf("Handle # OPC # 2: %d", mysqlHandle);
return (true);
}
pawn Код:
Hook:user_OnPlayerConnect(playerid)
{
printf("Handle # OPC # 3: %d", mysqlHandle);
<..>code
printf("Handle # OPC # 4: %d", mysqlHandle);
return (true);
}
Quote:
[16:44:35] Handle # OGI # 1: 1 [16:44:35] Handle # OGI # 2: 1 [16:44:35] Handle # OGI # 4: 1 [16:45:08] Handle # OPC # 3: 76 [16:45:08] Handle # OPC # 4: 76 [16:45:08] Handle # OPC # 1: 76 [16:45:08] Handle # OPC # 2: 76 [16:45:11] Handle # OPC # 5: 76 [16:45:11] Handle # OPC # 6: 76 [16:45:12] Handle # OPC # 7: 76 [16:45:12] Handle # OPC # 8: 76 |