예제 #1
0
파일: CakeAdapter.php 프로젝트: lhas/pep
 /**
  * Executes a query and returns only one row as an array.
  *
  * @param string $sql SQL
  * @return array
  */
 public function fetchRow($sql)
 {
     return $this->adapter->fetchRow($sql);
 }
예제 #2
0
 protected function selectLimit()
 {
     $name = $this->adapter->quoteTableName($this->origin->getName());
     $limit = $this->adapter->fetchRow("SELECT MAX(id) FROM {$name}")[0];
     return (int) $limit;
 }