MySQL Ping
#1

Hello there, Sorry I'm facing proplem with this things, I'm newbie with MySQL still trying to learn it.

pawn Код:
error 017: undefined symbol "mysql_ping"
pawn Код:
stock ConnectMySQL()
{
    dbHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    mysql_debug(1);
    if(mysql_ping() == -1)
    {
        printf("Failed to connect to MySQL !");
    } else {
        printf("Connected to MySQL !");
    }
    return 1;
}
Reply
#2

if(mysql_ping(dbname) == -1 or 1) as you want

if i helped +rep me
Reply
#3

If you're using the latest MySQL, you don't need Mysql_ping

PHP код:
if(!mysql_errno()) print("MySQL Connection Success");
else print(
"MySQL Connection Failed"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)