Hi All,
I want to have 2 connections at the same time to different servers.
To test what I want i made the following testscript:
2 databases:
database a (contains table test1)
database aa (contains table test2)
login info is the same.
<?php
include_once('classes/tbssql_mysql.php');
$db_a = new clsTbsSQL('localhost','root','','a');
$db_a->Mode=3;
$db_aa = new clsTbsSQL('localhost','root','','aa');
$db_aa->Mode=3;
$row_a=$db_a->GetRow('select * from test1');
$row_aa=$db_aa->GetRow('select * from test2');
?>
|
The result of this code is:
[TbsSql] Trace SQL: select * from test1
[TbsSql] Database error message: Table 'aa.test1' doesn't exist
[TbsSql] Trace SQL: select * from test2
|
The first query performed is performed on the wrong connection, yet I selected the right one...? Is there a way to fix this problem?