connession_handle always 1
#1

Hi guys i use this plugin : https://sampforum.blast.hk/showthread.php?tid=56564

i have this :

global variable
new handle
#define HOST "127.0.0.1"
#define USER "root"
#define DATABASE "example"
#define PASSWORD ""

ongamemodeinit()
{
handle=mysql_connect(HOST, USER, DATABASE, PASSWORD);
printf("handle %d",handle);
}

the handle is always 1,
if i turn on or off the mysql server or change the name of database with one doesn't exist the handle is 1. Why?
Reply
#2

The handle is the connection ID.
If you have to connections to different databases, there will be 1 and 2.

If you're checking if the connection wasn't established, use mysql_errno.
Reply
#3

Quote:
Originally Posted by Stinged
View Post
The handle is the connection ID.
If you have to connections to different databases, there will be 1 and 2.

If you're checking if the connection wasn't established, use mysql_errno.
Resolved. Thak you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)