SA-MP Forums Archive
[Help] MySQL Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] MySQL Problem (/showthread.php?tid=662994)



[Help] MySQL Problem - ApolloScripter - 18.01.2019

In addition to those listed below, the compiler accuses of error, when I put something related to MySQL, however I have already updated the plugin and necessary files, I have put the include, but still continues to give error when compiling, including the errors below.

PHP Code:
forward ConnectMySQL();
public 
ConnectMySQL()
{   
    new 
MySQLOptoption_id mysql_init_options();
    
mysql_set_option(option_idAUTO_RECONNECTtrue);
    
dbTop mysql_connect(SQL_HOSTSQL_USERSQL_PASSSQL_DBoption_id);
    if(
dbTop == MYSQL_INVALID_HANDLE || mysql_errno(dbTop) != 0)
    {
        print(
"=================== MYSQL CONNECTION ===================");
        print(
"[CONNECTION ERROR] Error connecting to Database.");
        print(
"=================== MYSQL CONNECTION ===================");  
        
SendRconCommand("exit");    
    }
    print(
"=================== MYSQL CONNECTION ===================");
    print(
"[CONNECTION ACCEPT] Connected Database.");
    print(
"=================== MYSQL CONNECTION ===================");
    return 
1;

Errors:
Code:
error 017: undefined symbol "mysql_init_options"
error 017: undefined symbol "mysql_set_option"



Re: [Help] MySQL Problem - ApolloScripter - 18.01.2019

Quote:
Originally Posted by Y_Less
View Post
Have you included the includes?
Yes, i Did it.


Re: [Help] MySQL Problem - B3x7K - 18.01.2019

Update mysql to r40 or 41-2.


Re: [Help] MySQL Problem - ApolloScripter - 18.01.2019

I've tried all the latest versions, not one recognizes the commands.