Exemplo n.º 1
0
 public function fetchRange($from = 0, $to = -1)
 {
     assert(is_int($from));
     assert(is_int($to));
     assert(count($this->fields) > 0);
     if (!$this->db->tableExists($this->tableName)) {
         return array();
     }
     $query = 'SELECT gid,' . implode(',', $this->fields) . ' FROM :::table WHERE parent=:parent ORDER BY id';
     $query .= $this->db->createLimit($from, $to);
     $bindings = array(':::table' => $this->tableName, 'parent' => $this->getParent());
     return $this->db->fetch($query, $bindings);
 }