示例#1
0
文件: abstract.php 项目: nouphet/rata
 /**
  * Enter description here...
  *
  * @param string $sql
  * @param int $limit
  * @param int $start
  * @return boolean
  */
 function &_query($sql, $limit = 0, $start = 0)
 {
     if (!($result =& $this->_db->query($sql, $limit, $start))) {
         $this->_error = $this->_db->error();
         $result = false;
     }
     return $result;
 }
示例#2
0
 /**
  * execute an SQL statement
  *
  * @param string $sql   SQL statement to execute
  * @param bool   $force true to use queryF
  *
  * @return mixed result resouce if no error,
  *               true if no error but no result
  *               false if error encountered.
  *               Any error message is in $this->lastError;
  */
 private function &execSql($sql, $force = false)
 {
     if ($force) {
         $result = $this->db->queryF($sql);
     } else {
         $result = $this->db->query($sql);
     }
     if (!$result) {
         $this->lastError = $this->db->error();
         $this->lastErrNo = $this->db->errno();
     }
     return $result;
 }