Note: _DB is an extender class that the app controller creates dynamically based on whether the active record class is being used or not.
Author: ExpressionEngine Dev Team
Inheritance: extends CI_DB
Esempio n. 1
0
 /** http://stackoverflow.com/questions/6470267/grouping-where-clauses-in-codeigniter
  * This function will allow you to do complex group where clauses in to c and (a AND b) or ( d and e)
  * This function is needed as else the where clause will append an automatic AND in front of each where Thus if you wanted to do something
  * like a AND ((b AND c) OR (d AND e)) you won't be able to as the where would insert it as a AND (AND (b...)) which is incorrect. 
  * Usage: start_group_where(key,value)->where(key,value)->close_group_where() or complex queries like
  *        open_bracket()->start_group_where(key,value)->where(key,value)->close_group_where()
  *        ->start_group_where(key,value,'','OR')->close_group_where()->close_bracket() would produce AND ((a AND b) OR (d))
  * @param $key mixed the table columns prefix.columnname
  * @param $value mixed the value of the key
  * @param $escape string any escape as per CI
  * @param $type the TYPE of query. By default it is set to 'AND' 
  * @return db object.  
  */
 public function start_group_where($key, $value = NULL, $escape = NULL, $type = "AND")
 {
     $this->open_bracket($type);
     return parent::_where($key, $value, '', $escape);
 }
 public final function __construct($params)
 {
     return parent::__construct($params);
 }
Esempio n. 3
0
 public function __construct(Connection $connection)
 {
     $this->connection = $connection;
     $params = $connection->getConfig();
     parent::__construct($params);
 }