hi
>
how can i connect more then one database in the same project.
>
Simple - just connect and save the result of the connection. This will
be a resource representing the connection; just use the appropriate
resource in all of your calls (virtually all database function calls
have an optional parameter being the connection resource).
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attgl obal.net
=============== ===
On Sat, 15 Mar 2008 02:57:45 +0100, Jerry Stuckle
<jstucklex@attg lobal.netwrote:
Damodhar wrote:
>hi
> how can i connect more then one database in the same project.
>>
>
Simple - just connect and save the result of the connection. This will
be a resource representing the connection; just use the appropriate
resource in all of your calls (virtually all database function calls
have an optional parameter being the connection resource).
Be aware though: of both databases are on the same database server, and
reachable with the same connection & user, it's often just more lucrative
to use full names for tables in queries, at least in case of MySQL.
--
Rik Wasmus
Be aware though: of both databases are on the same database server, and
reachable with the same connection & user, it's often just more
lucrative to use full names for tables in queries, at least in case of
MySQL.
True. But there are other reasons for multiple connections. I often have
a separate connection to the same database for error logging (lazily
initiated, not open by default). This allows my error handling code to
log errors to a table, even if the main code does a transaction rollback
later.
Comment