Jump to content
  • 0

Parametri mysql


Jimmi

Question

Problema intalnita (descriere):Am incercat sa trec gm pe r39-3.La lovesc la MySQLCheckConnection unde nu gasesc cu ce se inlocuieste msql_ping...
Ero(area / rile) / warning-(ul / urile):(19671) : error 017: undefined symbol "mysql_ping"
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):=
Ati incercat sa rezolvati singur?:Da

forward MySQLCheckConnection();
public MySQLCheckConnection()
{
   if(mysql_ping())
   {
      return 1;
   }
   else
   {
      print("MYSQL: Could not reconnect to server, terminating server...");
      mysql_reconnect();
      MySQLCheckConnection();
      return 1;
   }
}
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Problema intalnita (descriere):Am incercat sa trec gm pe r39-3.La lovesc la MySQLCheckConnection unde nu gasesc cu ce se inlocuieste msql_ping...
Ero(area / rile) / warning-(ul / urile):(19671) : error 017: undefined symbol "mysql_ping"
Liniile de cod / sursa / script-ul(obligatoriu):
Imagini / Video (optional):=
Ati incercat sa rezolvati singur?:Da

forward MySQLCheckConnection();
public MySQLCheckConnection()
{
   if(mysql_ping())
   {
      return 1;
   }
   else
   {
      print("MYSQL: Could not reconnect to server, terminating server...");
      mysql_reconnect();
      MySQLCheckConnection();
      return 1;
   }
}

Tu vrei sa faci conexiunea la baza de date asa?

Link to comment
Share on other sites

  • 0

Conexiunea e facuta asa:

forward MySQLConnect();
public MySQLConnect()
{
    handle = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
    if(handle && mysql_errno(handle) == 0)
    {
        printf("[MYSQL]: Conexiunea la (%s) a fost stabilita 0x069!", mysql_database);
    }
    else
    {
        printf("[MYSQL]: Conexiunea la (%s) a fost esuata 0x013!", mysql_database);
        SendRconCommand("exit");
    }
    return 1;
}
Edited by Jimmi
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.