On Fri, Jun 6, 2008 at 2:28 PM, TUT - LightSpeed <[EMAIL PROTECTED]> wrote:

> 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();
>
> I get error that temp_table doesn't exist on db2
>
> How can it be possible to use it on db2 queries ?
>

Temporary tables are locked down to just the current connection, so you
really can't. If you really need to use two connections to the same
database, you could create a regular table with a unique name every time and
share it.

But why do you need two separate connections? Can you not do it in one?

Reply via email to