22.07.2010, 09:31
(
Последний раз редактировалось DeathOnaStick; 22.07.2010 в 10:00.
)
Hey.
First the code:
Okay, now my question: Why does it say "Connected to database", even when i'm just running the server on localhost and i actually dont have any internet-connection?
Did i misunderstood something in this function or is my code wrong? Please help.
Thanks.
PS: Indentation actually is correct, but the forums screwed it .
First the code:
pawn Код:
if(!mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
{
print("#Warning: Could not connect to MySQL Database!");
print("#Warning: Retrying...");
print("-----------------------------------------------");
if(!mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
{
print("#Warning: Could not connect to MySQL Database!");
print("#Warning: Retrying...");
print("-----------------------------------------------");
if(!mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
{
print("#ERROR: COULD NOT CONNECT TO MYSQL-DATABASE!");
print("-----------------------------------------------");
}
}
}
else if(mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS))
{
print("#Connected to MySQL Database.");
print("-----------------------------------------------");
}
Did i misunderstood something in this function or is my code wrong? Please help.
Thanks.
PS: Indentation actually is correct, but the forums screwed it .