v5:reference:loadbalancer:addconnection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:reference:loadbalancer:addconnection [2017/04/18 04:37] – ↷ Links adapted because of a move operation 54.167.41.20 | v5: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: |
| == See Also == | == See Also == | ||
| - | [[v5: | + | [[v5: |
| - | [[v5: | + | |
| == Syntax == | == Syntax == | ||
| bool addConnection( | bool addConnection( | ||
| Line 14: | Line 13: | ||
| </ | </ | ||
| ===== Description ===== | ===== Description ===== | ||
| - | The method '' | + | The method '' |
| + | |||
| + | 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; | ||
| + | $driver = ' | ||
| + | $database = ' | ||
| + | $user = ' | ||
| + | $password = ' | ||
| + | $host = ' | ||
| + | $db0 = new ADOdbLoadBalancerConnection( $driver, | ||
| + | ' | ||
| + | 10, | ||
| + | false, | ||
| + | $host, | ||
| + | $user, | ||
| + | $password, | ||
| + | $database ); | ||
| + | /* | ||
| + | * Add the connection to the pool | ||
| + | */ | ||
| + | $db-> | ||
| </ | </ | ||
v5/reference/loadbalancer/addconnection.1492483072.txt.gz · Last modified: (external edit)
