Example #1
0
 /**
 * Creates a new query object, checks which driver we are using and set the character used for quoting
 *
 * @param \PHPixie\DB $db Database connection
 * @param string $type Query type. Available types: select, update, insert, delete, count
 * @return \PHPixie\DB\PDOV\Query
     @see \PHPixie\DB\Query::__construct()
 */
 public function __construct($db, $type)
 {
     parent::__construct($db, $type);
     $this->_db_type = $this->_db->db_type;
     $this->_quote = $this->_db_type == 'mysql' ? '`' : '"';
     $this->vulnFields = new \SplObjectStorage();
     $this->methods['limit'] = array('integer', 'NULL', 'string');
     $this->methods['offset'] = array('integer', 'NULL', 'string');
 }
Example #2
0
 /**
 * Creates a new query object, checks which driver we are using and set the character used for quoting
 *
 * @param \PHPixie\DB $db Database connection
 * @param string $type Query type. Available types: select, update, insert, delete, count
 * @return \PHPixie\DB\PDOV\Query
     @see \PHPixie\DB\Query::__construct()
 */
 public function __construct($db, $type)
 {
     parent::__construct($db, $type);
     $this->_db_type = $this->_db->db_type;
     $this->_quote = $this->_db_type == 'mysql' ? '`' : '"';
 }