Exemplo n.º 1
0
 /** @return PDOStatement */
 function query($start = null, $count = null)
 {
     $sql = $this->getSql($start, $count);
     $sql = preg_replace('/^SELECT /i', 'SELECT SQL_CALC_FOUND_ROWS ', $sql);
     $ret = $this->db->queryResultOnly($sql);
     $this->foundRows = $this->db->selectCell("SELECT FOUND_ROWS()");
     return $ret;
 }
Exemplo n.º 2
0
 /** for debug usage only! */
 function _dumpAll($whereAdd = null)
 {
     $q = $this->_db->queryResultOnly("SELECT * FROM {$this->_table} WHERE 1 {$where}");
     while ($row = $this->_db->fetchRow($q)) {
         $rec = new $this->_recordClass();
         $rec->fromRow($row);
         print (string) $rec;
         print "\n<br />\n";
     }
 }