mysql connection is dead
#1

I'm using the R6 plugin (because the r7 causes some troubles) and the server can't connect to the database. The only error i'm getting is:
pawn Код:
[18:53:00] >> mysql_query( Connection handle: 1 )
[18:53:00] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
The problem is that the mysql is running and when i'm trying to call mysql_num_rows() to count the account numbers, it returns -1.
Reply
#2

Anyone?
Reply
#3

your title explains the error... connect to mysql first.. usin mysql_connect()
Reply
#4

It's the first line in OnGameModeInit():
pawn Код:
#define SQL_HOST "127.0.0.1"
#define SQL_USER "root"
#define SQL_PASS ""
#define SQL_DB   "samp"
pawn Код:
public OnGameModeInit()
{
    ///
    mysql_connect(SQL_HOST,SQL_USER,SQL_PASS,SQL_DB);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)