ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:loadbalancer:clusterexecute

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
Next revisionBoth sides next revision
v5:reference:loadbalancer:clusterexecute [2017/04/20 00:33] – [$returnAllResults] mnewnhamv5:reference:loadbalancer:clusterexecute [2017/04/20 01:31] – [$existingConnectionsOnly] mnewnham
Line 23: Line 23:
 * Connection pool with 3 MySQL servers * Connection pool with 3 MySQL servers
 */ */
-$a = $db->clusterExecute('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE',false,false,false);+$a = $db->clusterExecute('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE', 
 +                         false, 
 +                         false, 
 +                         false);
 print_r($a); print_r($a);
 /* /*
Line 62: Line 65:
 */ */
  
-$a = $db->clusterExecute('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE',false,true,false);+$a = $db->clusterExecute('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE', 
 +                         false, 
 +                         true, 
 +                         false);
 print_r($a); print_r($a);
 /* /*
Line 78: Line 84:
 </code> </code>
 ===== $existingConnectionsOnly ==== ===== $existingConnectionsOnly ====
-===== Usage ==== +If the ''existingConnectionsOnly'' flag is set to true, the command passed to clusterExecute will only be executed against connections that are already in use, otherwise, the clusterExecute command will establish a connection to the database and then execute the command.
-<code php> +
-/* +
-* connection to load balancer assumed +
-*/ +
- +
-$SQL = "SET SESSION TIME ZONE"; +
- +
-$success = $db->clusterExecute($SQL); +
- +
-</code>+
  
v5/reference/loadbalancer/clusterexecute.txt · Last modified: 2017/04/25 01:11 by mnewnham