[eluser]Predator[/eluser]
** Quick and dirty hack
DB_active_rec.php
Code:
/**
* Function to set user defined variables in mysql. Example: $this->db->set_user_variable('application_user_id', $user_id');
*
* @param type $key
* @param type $value
*/
public function set_user_variable($key, $value)
{
$this->query('SET @'.$key.' = '.$value);
}