Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Latest commit

 

History

History
57 lines (37 loc) · 722 Bytes

limit.md

File metadata and controls

57 lines (37 loc) · 722 Bytes

查询语言.limit

limit 限制条数

# 函数原型
public function limit($nOffset = 0, $nCount = 30);

# SELECT `test`.*  FROM `test` LIMIT 5,10 
Db::table('test')->

limit(5, 10)->

get();

指示仅查询第一个符合条件的记录

# 函数原型
public function one();

# SELECT `test`.*  FROM `test` LIMIT 1 
Db::table('test')->

one()->

get();

指示查询所有符合条件的记录

# 函数原型
public function all();

# SELECT `test`.*  FROM `test` 
Db::table('test')->

all()->

get();

查询几条记录

# 函数原型
public function top($nCount = 30);

# SELECT `test`.*  FROM `test` LIMIT 0,15
Db::table('test')->

top(15)->

get();