[wp-trac] Re: [WordPress Trac] #2722: long winded way to use two wpdb instances

WordPress Trac wp-trac at lists.automattic.com
Mon May 22 11:33:14 GMT 2006


#2722: long winded way to use two wpdb instances
-----------------------+----------------------------------------------------
       Id:  2722       |      Status:  new                     
Component:  General    |    Modified:  Mon May 22 11:33:14 2006
 Severity:  normal     |   Milestone:  2.0.3                   
 Priority:  normal     |     Version:  2.0.2                   
    Owner:  anonymous  |    Reporter:  Philnate                
-----------------------+----------------------------------------------------
Comment (by masquerade):

 You're barking up the wrong tree. What you should be looking at is passing
 $this->dbh to every query, and changing mysql_connect's fourth parameter
 (bool new_link) to true, so that you get a new connection for each
 instance of the class. Persistant connections often have serious adverse
 side-effects, and your milage will vary based on server specifications,
 configuration, and traffic. We unfortunately do not have the luxury of
 assuming everyone has a server configured properly enough to not die under
 the load that persistant connections potentially creates when it comes
 under high traffic.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2722>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list