PHP Class SQLGlobal

Mostrar archivo Open project: zblogcn/zblogphp Class Usage Examples

Protected Properties

Property Type Description
$columns
$data
$groupBy
$having
$index
$join
$method
$option
$orderBy
$table
$where

Public Methods

Method Description
__call ( $callName, $argu )
__construct ( object &$db = null )
__get ( $getName )
__set ( $name, $value )
_sqlPush ( $sql ) If we use $this->$getName directly, PHP will throw [Indirect modification of overloaded property] So we have to wrap it.
column ( $columns ) Set column for query
data ( ) Set data for INSERT & UPDATE
exist ( $table )
groupBy ( $groupBy ) GroupBy
having ( $having ) Set having
limit ( ) Set limit & offset
option ( $option ) Set SQL query option
orderBy ( ) Order by
query ( $sql = null )
reset ( ) Re-initialize this class
where ( ) Set where query

Protected Methods

Method Description
buildBeforeWhere ( )
buildColumn ( )
buildCreate ( )
buildDelete ( )
buildDrop ( )
buildGroupBy ( )
buildHaving ( )
buildIndex ( )
buildInsert ( )
buildJoin ( )
buildLimit ( )
buildOrderBy ( )
buildOthers ( )
buildPagebar ( )
buildSelect ( )
buildTable ( )
buildUpdate ( )
buildWhere ( $originalWhere = null, $whereKeyword = null )
columnLoaderArray ( $columns )

Private Methods

Method Description
sql ( )
validateParamater ( $param )

Method Details

__call() public method

public __call ( $callName, $argu )

__construct() public method

public __construct ( object &$db = null )
$db object

__get() public method

public __get ( $getName )

__set() public method

public __set ( $name, $value )

_sqlPush() public method

It maybe a bug of PHP.
See also: http://stackoverflow.com/questions/10454779/php-indirect-modification-of-overloaded-property
public _sqlPush ( $sql )

buildBeforeWhere() protected method

protected buildBeforeWhere ( )

buildColumn() protected method

protected buildColumn ( )

buildCreate() protected method

protected buildCreate ( )

buildDelete() protected method

protected buildDelete ( )

buildDrop() protected method

protected buildDrop ( )

buildGroupBy() protected method

protected buildGroupBy ( )

buildHaving() protected method

protected buildHaving ( )

buildIndex() protected method

protected buildIndex ( )

buildInsert() protected method

protected buildInsert ( )

buildJoin() protected method

protected buildJoin ( )

buildLimit() protected method

protected buildLimit ( )

buildOrderBy() protected method

protected buildOrderBy ( )

buildOthers() protected method

protected buildOthers ( )

buildPagebar() protected method

protected buildPagebar ( )

buildSelect() protected method

protected buildSelect ( )

buildTable() protected method

protected buildTable ( )

buildUpdate() protected method

protected buildUpdate ( )

buildWhere() protected method

protected buildWhere ( $originalWhere = null, $whereKeyword = null )

column() public method

Set column for query
public column ( $columns )

columnLoaderArray() protected method

protected columnLoaderArray ( $columns )

data() public method

Set data for INSERT & UPDATE
public data ( )

exist() public method

public exist ( $table )

groupBy() public method

GroupBy
public groupBy ( $groupBy )

having() public method

Set having
public having ( $having )

limit() public method

Set limit & offset
public limit ( )

option() public method

Set SQL query option
public option ( $option )

orderBy() public method

Order by
public orderBy ( )

query() public method

public query ( $sql = null )

reset() public method

Re-initialize this class
public reset ( )

where() public method

Set where query
public where ( )

Property Details

$columns protected_oe property

protected $columns

$data protected_oe property

protected $data

$groupBy protected_oe property

protected $groupBy

$having protected_oe property

protected $having

$index protected_oe property

protected $index

$join protected_oe property

protected $join

$method protected_oe property

protected $method

$option protected_oe property

protected $option

$orderBy protected_oe property

protected $orderBy

$table protected_oe property

protected $table

$where protected_oe property

protected $where