SA-MP Forums Archive
Mysql_connect - 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: Mysql_connect (/showthread.php?tid=594713)



Mysql_connect - yvoms - 22.11.2015

So...
Im using BlueG Mysql R39-3.

Im using 2 different databases, at different hosts.
But im getting the following error(s)

[13:25:22] [ERROR] mysql_errno - invalid connection handle (id: 0)
[13:25:22] [ERROR] mysql_errno - invalid connection handle (id: 0)

It shouldn't have given me the errors.
But i think it is because the seccond connection is different from the other one.

Database = Mysql_connect instead of
Mysql_connect.

However i can not change the database = mysql_connect in order for the rest of my code to function.


Re: Mysql_connect - HydraHumza - 22.11.2015

Code:
mysql = mysql_connect(plrhost, plruser, plrdb, plrpass);



Re: Mysql_connect - yvoms - 22.11.2015

Rofl, Thanks yes, that was what i was looking for however, if i would like to add more connections, could i use mysql = mysql_connect multiple times, or is it an unique identifier?


Re: Mysql_connect - HydraHumza - 22.11.2015

Quote:
Originally Posted by yvoms
View Post
Rofl, Thanks yes, that was what i was looking for however, if i would like to add more connections, could i use mysql = mysql_connect multiple times, or is it an unique identifier?
Well I never tried that so I got no idea about that. :/


Re: Mysql_connect - yvoms - 22.11.2015

Ah thanks anyways, seems to have worked. + rep