CrossPHP
  • Namespace
  • Class
  • Download

Namespaces

  • Cross
    • Auth
    • Cache
      • Driver
      • Request
    • Core
    • DB
      • Connecter
      • Drivers
      • SQLAssembler
    • Exception
    • Http
    • I
    • Lib
      • Document
    • Module
    • MVC
    • Runtime
  • None

Interfaces

  • CacheInterface
  • HttpAuthInterface
  • PDOConnecter
  • RequestCacheInterface
  • RouterInterface
  • SqlInterface

Interface SqlInterface

Interface SqlInterface

Direct known implementers

Cross\DB\Drivers\PDOSqlDriver

Namespace: Cross\I
Package: Cross\I
Located at I/SqlInterface.php

Methods summary

public mixed
# get( string $table, string $fields, string|array $where )

获取一条数据

获取一条数据

Parameters

$table
表名
$fields
字段
$where
条件(建议只使用字符串常量,包含变量时请使用数组)

Returns

mixed
public mixed
# getAll( string $table, string $fields, string|array $where = '', integer|string $order = 1, integer|string $group_by = 1, integer|string $limit = 0 )

批量获取表中的数据

批量获取表中的数据

Parameters

$table
表名
$fields
要获取的字段名
$where
条件(建议只使用字符串常量,包含变量时请使用数组)
$order
排序
$group_by
分组
$limit
0表示无限制

Returns

mixed
public mixed
# find( string $table, string $fields, string|array $where, string|integer $order = 1, array & $page = array('p', 'limit'), integer $group_by = 1 )

带分页的查询

带分页的查询

Parameters

$table
表名
$fields
字段名
$where
条件(建议只使用字符串常量,包含变量时请使用数组)
$order
排序
$page
array('p', 'limit'); p表示当前页数, limit表示要取出的条数
$group_by

Returns

mixed
public mixed
# add( string $table, string $data, boolean $multi = false )

添加数据

添加数据

Parameters

$table
表名
$data
要插入的数据
$multi
是否批量插入

Returns

mixed
public mixed
# update( string $table, string $data, string $where )

更新数据

更新数据

Parameters

$table
表名
$data
要更新的数据
$where
筛选条件

Returns

mixed
public mixed
# del( string $table, string $where )

删除数据

删除数据

Parameters

$table
表名
$where
条件

Returns

mixed
CrossPHP API documentation generated by ApiGen