calcFoundRows() calcFoundRows(boolean $enable = true) : self 设置 SQL_CALC_FOUND_ROWS 标记. Parameters boolean $enable Returns self
noCache() noCache(boolean $enable = true) : self 设置 SQL_NO_CACHE 标记 Parameters boolean $enable Returns self
straightJoin() straightJoin(boolean $enable = true) : self 设置 STRAIGHT_JOIN 标记. Parameters boolean $enable Returns self
highPriority() highPriority(boolean $enable = true) : self 设置 HIGH_PRIORITY 标记 Parameters boolean $enable Returns self
smallResult() smallResult(boolean $enable = true) : self 设置 SQL_SMALL_RESULT 标记 Parameters boolean $enable Returns self
bigResult() bigResult(boolean $enable = true) : self 设置 SQL_BIG_RESULT 标记 Parameters boolean $enable Returns self
bufferResult() bufferResult(boolean $enable = true) : self 设置 SQL_BUFFER_RESULT 标记 Parameters boolean $enable Returns self
forUpdate() forUpdate(boolean $enable = true) : self 设置 FOR UPDATE 标记 Parameters boolean $enable Returns self
distinct() distinct(boolean $enable = true) : self 设置 DISTINCT 标记 Parameters boolean $enable Returns self
lowPriority() lowPriority(boolean $enable = true) : self 设置 LOW_PRIORITY 标记 Parameters boolean $enable Returns self
delayed() delayed(boolean $enable = true) : self 设置 DELAYED 标记 Parameters boolean $enable Returns self
fromSubSelect() fromSubSelect(string $table, string $name) : self 子查询 Parameters string $table string $name The alias name for the sub-select. Returns self
join() join(string $table, string $cond = null, string $type = '') : self 增加 join 语句 Parameters string $table string $cond string $type Throws \Exception Returns self
innerJoin() innerJoin(string $table, string $cond = null) : self inner join Parameters string $table string $cond Throws \Exception Returns self
leftJoin() leftJoin(string $table, string $cond = null) : self left join Parameters string $table string $cond Throws \Exception Returns self
rightJoin() rightJoin(string $table, string $cond = null) : self right join Parameters string $table string $cond Throws \Exception Returns self
joinSubSelect() joinSubSelect(string $join, string $spec, string $name, string $cond = null) : self joinSubSelect Parameters string $join inner, left, natural string $spec string $name sub-select 的别名 string $cond Throws \Exception Returns self
orHaving() orHaving(string $cond) : self or having 语句 Parameters string $cond The HAVING condition. Returns self
orderByASC() orderByASC(array $cols, boolean $order_asc = true) : self order by ASC OR DESC Parameters array $cols boolean $order_asc Returns self
bindValues() bindValues(array $bind_values) : self 批量为占位符绑定值 Parameters array $bind_values Returns self
bindValue() bindValue(string $name, mixed $value) : self 单个为占位符绑定值 Parameters string $name mixed $value Returns self
quoteName() quoteName(string $spec) : string|array Quotes Parameters string $spec Returns string|array
quoteNamesIn() quoteNamesIn(string $text) : string|array Quotes "table.col" 格式的字符串 Parameters string $text Returns string|array
setLastInsertIdNames() setLastInsertIdNames(array $last_insert_id_names) 设置 `table.column` 与 last-insert-id 的映射 Parameters array $last_insert_id_names
getLastInsertIdName() getLastInsertIdName(string $col) : mixed PDO::lastInsertId() Parameters string $col Returns mixed
set() set(string $col, string $value) : self 直接设置列的值 Parameters string $col string $value Returns self
__construct() __construct(string $host, integer $port, string $user, string $password, string $db_name, string $charset = 'utf8') 构造函数 Parameters string $host integer $port string $user string $password string $db_name string $charset
query() query(string $query = '', array $params = null, integer $fetchmode = \PDO::FETCH_ASSOC) : mixed 执行 SQL Parameters string $query array $params integer $fetchmode Returns mixed
column() column(string $query = '', array $params = null) : array 返回一列 Parameters string $query array $params Returns array
row() row(string $query = '', array $params = null, integer $fetchmode = \PDO::FETCH_ASSOC) : array 返回一行 Parameters string $query array $params integer $fetchmode Returns array
single() single(string $query = '', array $params = null) : string 返回单个值 Parameters string $query array $params Returns string
addColSELECT() addColSELECT(mixed $key, string $val) : void SELECT选择哪些列 Parameters mixed $key string $val
joinInternal() joinInternal(string $join, string $table, string $cond = null) : self 增加 join 语句 Parameters string $join inner, left, natural string $table string $cond Throws \Exception Returns self
fixJoinCondition() fixJoinCondition(string $cond) : string quote Parameters string $cond Returns string
setFlag() setFlag(string $flag, boolean $enable = true) 设置 flag. Parameters string $flag boolean $enable
addWhere() addWhere(string $andor, array $conditions) : self 添加 where 语句 Parameters string $andor 'AND' or 'OR array $conditions Returns self
addClauseCondWithBind() addClauseCondWithBind(string $clause, string $andor, array $conditions) 添加条件和绑定值 Parameters string $clause where 、having等 string $andor AND、OR等 array $conditions
addOrderBy() addOrderBy(array $spec) : self 增加 order by Parameters array $spec The columns and direction to order by. Returns self
quoteNameWithSeparator() quoteNameWithSeparator(string $spec, string $sep, integer $pos) : string 指定分隔符的 Quotes Parameters string $spec string $sep integer $pos Returns string
getListForQuoteNamesIn() getListForQuoteNamesIn(string $text) : array 返回 quote 元素列表 Parameters string $text Returns array
quoteNamesInLoop() quoteNamesInLoop(string $val, boolean $is_last) : string 循环 quote Parameters string $val boolean $is_last Returns string
replaceNamesAndAliasIn() replaceNamesAndAliasIn(string $val) : string 替换成别名 Parameters string $val Returns string
replaceNamesIn() replaceNamesIn(string $text) : string|array Quotes Parameters string $text Returns string|array
setCol() setCol(string $col, string $value) : self 设置单列的值 Parameters string $col . string $value Returns self
execute() execute(string $query, string $parameters = "") 执行 Parameters string $query string $parameters Throws \PDOException