public function getRow($field = '*', $where = array(), $order = array(), $offset = 0) { // 校验参数 if (!is_string($field) || empty($field)) { throw new LibraryException('参数错误:$field'); } if (!is_array($where)) { throw new LibraryException('参数错误:$where'); } if (!is_array($order)) { throw new LibraryException('参数错误:$order'); } if (!is_numeric($offset) || intval($offset) != $offset || $offset < 0) { throw new LibraryException('参数错误:$offset'); } $sql = $this->sqlBuilder->createSelectSql($field, $where, $order, 1, $offset); $row = $this->slaveHandle->queryRow($sql); return $row; }
public function __construct($server) { parent::__construct($server, true); }