MySql .. More than one database?
#1

Hello..

Can i use more than one database connected? (more mysql connections)
Reply
#2

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.
Reply
#3

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?
Reply
#4

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)