예제 #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');
 }
예제 #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' ? '`' : '"';
 }
예제 #3
0
 /**
  * Finds all rows that meet set criteria.
  *
  * @return \PHPixie\ORM\Result Returns ORM Result that you can use in a 'foreach' loop.
  */
 public function find_all()
 {
     $paths = $this->prepare_relations();
     return $this->pixie->orm->result($this->model_name, $this->query->execute(), $paths);
 }