OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Temp table on multiple connections

From: TUT - LightSpeed (bingols-media.com)
Date: Fri Jun 06 2008 - 16:28:34 CDT


I have this problem

I connect to 2 database servers in the same script

If I create a temp table on one, won't be able on the other

$db1 = db_connect1();
$db2 = db_connect2();

$query = "CREATE TEMPORARY TABLE temp_table SELECT ..............";
$result = mysql_query($query,$db1) or die(mysql_error());

$query = "SELECT * FROM temp_table";
$result = mysql_query($query,$db2) or die(mysql_error());
 
I get error that temp_table doesn't exist on db2

How can it be possible to use it on db2 queries ?

Thanks in advance
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql