Req #7760 [Opn->Csd]: new_link option is not in the documentation
| From: | lsmith@php.net | Date: | Tue, 30 May 2006 21:35:22 +0000 |
| Subject: | Req #7760 [Opn->Csd]: new_link option is not in the documentation | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-7960@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=7760&edit=1
ID: 7760
Updated by: lsmith@php.net
Reported By: str at strgt dot cjb dot net
-Status: Open
+Status: Closed
Id: 7760
Type: Feature/Change Request
Package: Documentation
Operating System: GNU/Linux
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
I just commited some docs for this:
http://cvs.php.net/viewcvs.cgi/peardoc/en/package/database/mdb2/intro-dsn.xml?r1=1.1&r2=1.2&diff_format=u
If you have specific suggestions to improve this test further I would
appreciate it.
Previous Comments:
------------------------------------------------------------------------
[2006-05-30 17:22:58] str at strgt dot cjb dot net
This is working well, but it is not in the documentation
------------------------------------------------------------------------
[2006-05-30 17:22:00] str at strgt dot cjb dot net
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 this bug report at http://pear.php.net/bugs/bug.php?id=7760&edit=1