[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    Re: [PHP-DB] Multiple instances of mysql_connect() in single PHP
From:       Chris <dmagick () gmail ! com>
Date:       2009-11-12 21:52:56
Message-ID: 4AFC83B8.20300 () gmail ! com
[Download RAW message or body]

Richard Quadling wrote:
> 2009/11/11 Chris <dmagick@gmail.com>:
>> Plus the assumption that they are on the same server and that the user
>> you're connecting with has access to both databases..
> 
> See the initial post.
> 
> $db_material = mysql_connect("localhost", "root", "secret");
> $db_labor = mysql_connect("localhost", "root", "secret");
> 
> 2 connections using the same server and credentials - results in 1
> real connection.
> 
> $db_material = mysql_connect("localhost", "root", "secret", true);
> $db_labor = mysql_connect("localhost", "root", "secret", true);
> 
> should fix it.

Good pickup - the rest of us missed it :)


-- 
Postgresql & php tutorials
http://www.designmagick.com/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic