设置初始化查询条件
init($data)
设置列表搜索条件
set_where_list($where)
追加列表搜索条件
add_where_list($where)
设置操作主键
id($id = '')
设置操作表
table($name)
设置操作站点的表
table_site($name, $site = SITE_ID)
获取表前缀
dbprefix($name = '')
附表不存在时创建附表
is_data_table($table, $tid)
表是否存在
is_table_exists($table)
表字段是否存在
is_field_exists($table, $name)
字段值是否存在
is_exists($id, $name, $value)
统计数量
counts($table = '', $where = '')
插入数据
insert($data) replace($data)
更新数据
update($id, $data, $where = '')
删除数据 (主键)
delete($id = 0 , $where = '')
删除全部内容
clear_all()
批量删除数据 (主键数组)
delete_all($ids, $where = '') deleteAll($ids, $where = '')
保存单个数据 (主键名、字段名、字段值)
save($id, $name, $value, $where = '')
获取单个数据(主键)
get($id)
获取全部数据(指定数量、数组主键id)
get_all($num = 0, $key = '') getAll($num = 0, $key = '')
获取单个数据
getRow()
操作数据(数据不存在-1,变更值0,变更至1)
used($id, $name)
条件组合
_where($table, $name, $value, $field)
条件查询($select 查询对象,$where 是否搜索)
_limit_page_where(&$select, $param)
分页
limit_page($size = SYS_ADMIN_PAGESIZE, $where = '')
条件
select($field) where($name, $value = '') like($name, $value = '') where_in($name, $value)
指定查询数量($offset 起始位置,$length 查询数量)
limit(int $offset, int $length = null)
排序
order_by($value)
运行sql
query_sql($sql, $more = 0)
批量执行
query_all($sql)
获取当前执行后的sql语句
get_sql_query()
显示数据库错误
_return_error($msg)