Help with mysql [r7]
#1

Ehm i am having a noob question :/
pawn Код:
forward MySQLConnect();
public MySQLConnect()
{
    new DBHandle=mysql_connect(MySQL_Host,MySQL_User,MySQL_DB,MySQL_Password);
    if(mysql_ping()==1)
    {
        mysql_debug(1);
        printf("Successfully connected to %s",MySQL_DB);
    }
    else
    {
        printf("[MYSQL] Error: Couldn't connect to %s",MySQL_DB);
    }
    return 1;
}
my connect callback, i added it under ongamemodeinit
Now how to use mysql_function_query?
when i try this
pawn Код:
mysql_function_query(DBHandle,rest of the function);
i get this error
Код:
error 017: undefined symbol "DBHandle"
Reply
#2

Quote:

error 017: undefined symbol "DBHandle"

DBHandle its like string you must define it before you use it example
pawn Код:
new DBHandle[256]
- 256 its random change wich yours ,depent how long is
Reply
#3

Quote:
Originally Posted by doreto
Посмотреть сообщение
DBHandle its like string you must define it before you use it example
pawn Код:
new DBHandle[256]
- 256 its random change wich yours ,depent how long is
So i define it adding mysql connect function at the top of my script?
Reply
#4

DBHandle should be integer.

so at the top of the script. write
pawn Код:
new DBHandle;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)