ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:loadbalancer:addconnection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:reference:loadbalancer:addconnection [2017/04/20 01:26] mnewnhamv5:reference:loadbalancer:addconnection [2017/04/25 01:08] (current) mnewnham
Line 3: Line 3:
 <WRAP right box> <WRAP right box>
 == Applies To == == Applies To ==
-ADOdb Load Balancer+[[v5:loadbalancer:index|ADOdb Load Balancer]]
 == See Also == == See Also ==
 [[v5:reference:loadbalancer:adodbloadbalancerconnection|ADOdbLoadBalancerConnection()]]\\ [[v5:reference:loadbalancer:adodbloadbalancerconnection|ADOdbLoadBalancerConnection()]]\\
Line 13: Line 13:
 </WRAP> </WRAP>
 ===== Description ===== ===== Description =====
-The method ''addConnection()'' adds an ADOdb connection, created by the instantiation of the [[v5:reference:loadbalancer:getadodbobject|ADOdbLoadBalancerConnection()]] class to the load balancer connection pool. Until the connection is added to the pool it cannot be used by the load balancer. +The method ''addConnection()'' adds an ADOdb connection, created by the instantiation of the [[v5:reference:loadbalancer:getadodbobject|ADOdbLoadBalancerConnection()]] class to the load balancer connection pool. Until the connection is added to the pool it cannot be used by the load balancer
 + 
 +Note that a connection to the database is not established until the first command is executed. 
 + 
 +The method returns true if the connection is successfully added to the pool, or false if an error occurs.
 --------------------------- ---------------------------
 ===== Usage ==== ===== Usage ====
 <code php> <code php>
-$db = new ADOdbLoadBalancer();+$db = new ADOdbLoadBalancer;
  
 $driver = 'mysqli'; $driver = 'mysqli';
v5/reference/loadbalancer/addconnection.1492644363.txt.gz · Last modified: 2017/04/21 11:37 (external edit)