PHP 클래스 DbSql

파일 보기 프로젝트 열기: zblogcn/zblogphp 1 사용 예제들

공개 메소드들

메소드 설명
Count ( string $table, string $count, string $where = null, null $option = null ) : string 构造计数语句
CreateTable ( string $table, array $datainfo, $engine = null ) : string 创建表,返回构造完整的SQL语句
DelTable ( string $table ) : string 删除表,返回SQL语句
Delete ( string $table, string $where, array | null $option = null ) : string 构造数据删除语句
ExistTable ( string $table, string $dbname = '' ) : string 检查表是否存在,返回SQL语句
Export ( $table, $keyvalue, $type = 'mysql' )
Filter ( $sql ) : mixed 返回经过过滤的SQL语句
Insert ( string $table, string $keyvalue ) : string 构造数据插入语句
ReplacePre ( &$s ) : string 替换数据表前缀
Select ( string $table, string $select = null, string $where = null, string $order = null, string $limit = null, array | null $option = null ) : string 构造查询语句
Update ( string $table, string $keyvalue, string $where, array | null $option = null ) : string 构造数据更新语句
__construct ( &$db = null )
get ( )

메소드 상세

Count() 공개 메소드

构造计数语句
public Count ( string $table, string $count, string $where = null, null $option = null ) : string
$table string
$count string
$where string
$option null
리턴 string 返回构造的语句

CreateTable() 공개 메소드

创建表,返回构造完整的SQL语句
public CreateTable ( string $table, array $datainfo, $engine = null ) : string
$table string
$datainfo array
리턴 string

DelTable() 공개 메소드

删除表,返回SQL语句
public DelTable ( string $table ) : string
$table string
리턴 string

Delete() 공개 메소드

构造数据删除语句
public Delete ( string $table, string $where, array | null $option = null ) : string
$table string
$where string
$option array | null
리턴 string 返回构造的语句

ExistTable() 공개 메소드

检查表是否存在,返回SQL语句
public ExistTable ( string $table, string $dbname = '' ) : string
$table string
$dbname string
리턴 string

Export() 공개 메소드

public Export ( $table, $keyvalue, $type = 'mysql' )

Filter() 공개 메소드

返回经过过滤的SQL语句
public Filter ( $sql ) : mixed
$sql
리턴 mixed

Insert() 공개 메소드

构造数据插入语句
public Insert ( string $table, string $keyvalue ) : string
$table string
$keyvalue string
리턴 string 返回构造的语句

ReplacePre() 공개 메소드

替换数据表前缀
public ReplacePre ( &$s ) : string
리턴 string

Select() 공개 메소드

构造查询语句
public Select ( string $table, string $select = null, string $where = null, string $order = null, string $limit = null, array | null $option = null ) : string
$table string
$select string
$where string
$order string
$limit string
$option array | null
리턴 string 返回构造的语句

Update() 공개 메소드

构造数据更新语句
public Update ( string $table, string $keyvalue, string $where, array | null $option = null ) : string
$table string
$keyvalue string
$where string
$option array | null
리턴 string 返回构造的语句

__construct() 공개 메소드

public __construct ( &$db = null )

get() 공개 메소드

public get ( )