Posts: 2,175
Threads: 235
Joined: Sep 2009
Reputation:
0
Hello..
Can i use more than one database connected? (more mysql connections)
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Yes, you just need to make sure you're keeping the database connection ID's different.
So, doing dataHandle1 = mysql_connect(...); and dataHandle2 = mysql_connect(...); will connect to two different things.
Posts: 2,175
Threads: 235
Joined: Sep 2009
Reputation:
0
So i have to add, to all MySql functions the datahandle variable.. or the frist connection is default 0 so i can add datahandle only for connection 2?
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
Yes, all functions have to have the connectionHandle variable attached to them. The default is 1, not 0. If you don't want to attach a connectionHandle to all of them, only attach them to the secondary connection; that should work fine!