Re: Multiple instances of mysql_connect() in single PHP document.

From: Date: Thu, 12 Nov 2009 13:13:22 +0000
Subject: Re: Multiple instances of mysql_connect() in single PHP document.
References: 1 2 3 4  Groups: php.db 
Request: Send a blank email to php-db+get-46651@lists.php.net to get a copy of this message
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. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.db (#46651) next »