Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.12.2

Request #1905 Patch : Use new_link with mysql_connect
Submitted: 2004-07-17 19:48 UTC
From: hmn at newz dot dk Assigned: danielc
Status: Closed Package: DB
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-07-17 19:48 UTC] hmn at newz dot dk
Description: ------------ The mysql module run mysql_select_db every time a query is executed. This is done to support connections to several databases in the same script, but in mysql_connect (from php 4.2) the option new_link has been added so that you can force creation of a new link. I have added code to DB/mysql.php that uses the new_link option instead of doing a mysql_select_db for every query. Reproduce code: --------------- http://area-51.dk/files/pear-db-mysql.diff

Comments

 [2004-10-11 05:41 UTC] justinpatrin
I've also created a patch which makes use of new_link. This patch is different, though, as it adds a new option called new_link that a user can make use of by putting it into the optioans array. http://www.reversefold.com/PEAR/DB.new_link.patch
 [2005-01-17 07:59 UTC] danielc
Request 2865 has been marked a duplicate of this bug.
 [2005-01-31 18:51 UTC] danielc
Added in CVS.