01.01.2015, 16:24
Hellu all,
My Gamemode having two connections to mysql!
first connect and second connect!
my Server connect to first connection but isn't connecting to second connection !
why?
here are the codes and Server_log!
Here are the GM codes!
My Gamemode having two connections to mysql!
first connect and second connect!
my Server connect to first connection but isn't connecting to second connection !
why?
here are the codes and Server_log!
Код:
[12:01:45] [12:01:45] [12:01:46] 24424 Dynamic Objects Loaded [12:01:46] 17 Bars Loaded [12:01:46] 559 Vehicles Loaded [12:01:46] -1218878512 [12:01:46] [MYSQL]:first Connection to `DATABASE` successful! || 1 [12:01:46] EEEEEEEEEEEE XXX XXX SSSSSSSSSSSSSSS [12:01:46] EEEEEEEEEEEE XXX XXX SSSSSSSSSSSSSSS [12:01:46] EEE XXX XXX SSS [12:01:46] EEE XXX XXX SSS [12:01:46] EEE XXX XXX SSS [12:01:46] EEEEEEEEE XXXXXXXXX SSSSSSSSSSSSSSS [12:01:46] EEEEEEEEE XXXXXXXXX SSSSSSSSSSSSSSS [12:01:46] EEE XXX XXX SSS [12:01:46] EEE XXX XXX SSS [12:01:46] EEEEEEEEEEEE XXX XXX SSSSSSSSSSSSSSS by SpikY_™ [12:01:46] EEEEEEEEEEEE XXX XXX SSSSSSSSSSSSSSS [12:01:46] Number of vehicle models: 179
pawn Код:
forward ConnectMySQL();
public ConnectMySQL()
{
eXs=mysql_connect("localhost","******", "*******", "******");
//example eXs=mysql_connect("127.0.0.1","*******", "******", "*********");
printf("%d",mysql_errno(eXs));
if(mysql_errno() == 0)
{
mysql_close(eXs);
printf("[MYSQL]: [ERROR]:first Connection to `DATABASE` failed!");
eXs=mysql_connect("localhost","********", "****", "***");
//example eXs=mysql_connect("127.0.0.1","********", "******", "*******");
printf("%d",mysql_errno(eXs));
if(mysql_errno() == 0)
{
mysql_close(eXs);
printf("[MYSQL]: [ERROR]:Second Connection to `DATABASE` failed!");
}
else
{
//mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG);
printf("[MYSQL]:second Connection to `DATABASE` successful! || %d",eXs);
con=2;
}
}
else
{
//mysql_log(LOG_ERROR | LOG_WARNING | LOG_DEBUG);
printf("[MYSQL]:first Connection to `DATABASE` successful! || %d",eXs);
con=1;
}
return 1;
}