====== setSessionVariable ====== ~~NOTOC~~ == Applies To == [[v5:loadbalancer:index|ADOdb Load Balancer]] == Syntax == bool setSessionVariable( string $key, string $variable, optional bool $immediateExecution=false ) ===== Description ===== The method ''setSessionVariable()'' queues up a key/value pair to be executed using the database specific //''SET SESSION''// syntax. --------------------------- ===== Usage ==== /* * connection to load balancer assumed */ $ok = $db->setSessionVariable('param1','variable1'); ===== Parameters ===== ==== $key ==== ==== $parameter ==== ==== $immediateExecution ==== If the parameter is set to true, the method iterates through all the connections in the pool, establishes a connection to the database and executes the command. If set to false, then parameters are executed the first time a connection is made to the database.