[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-doc
Subject: [PEAR-DOC] [PEAR-BUG] Req #7760 [NEW]: new_link option is not in the documentation
From: "str at strgt dot cjb dot net" <pear-doc () lists ! php ! net>
Date: 2006-05-30 21:22:00
Message-ID: bug-7760 () pear ! php ! net
[Download RAW message or body]
From: str at strgt dot cjb dot net
Operating system: GNU/Linux
Package version:
PHP version: 5.1.2
Package: Documentation
Bug Type: Feature/Change Request
Bug description: new_link option is not in the documentation
Description:
------------
When you are connecting to two databases with
the same info except database name, executing a query on the first,
executing a query on the second, and then executing a query on the
first again results in the third query using the wrong database. I
found this while trying to figure out what is going on to cause this
problem that didn't exist before I migrated from DB to MDB2.
This problem is solve using ?new_link=true in the dsn in the 2 dsn like
here:
$dsn =
"mysql://$dbUser:$dbPasswd@localhost/$database?new_link=true";
Test script:
---------------
$dbUser = "root";
$dbPasswd = "toor";
$database = "db1";
$dsn =
"mysql://$dbUser:$dbPasswd@localhost/$database?new_link=true";
$db =& MDB2::factory($dsn);
if (PEAR::isError($db)) {
die ($db->getMessage());
}
$dbUser = "root";
$dbPasswd = "toor";
$database = "db2";
$dsn =
"mysql://$dbUser:$dbPasswd@localhost/$database?new_link=true";
$stdb =& MDB2::factory($dsn);
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=7760&edit=1
--
--
PEAR Documentation List Mailing List (http://pear.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