08.09.2014, 17:06
Change mysql_debug(1); to mysql_log();
mysql_connect will return a valid connection handle which is represented by a number, or 0 if the connection isn't successful.
loose indentation warnings mean that the code is not evenly indented.
pawn Код:
stock ConnectMySQL()
{
dbHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
mysql_log();
if(dbHandle)
{
printf("Failed to connect to MySQL !");
} else {
printf("Connected to MySQL !");
}
return 1;
}
loose indentation warnings mean that the code is not evenly indented.