PHP Class SlightPHP\Db

Afficher le fichier Open project: hetao29/slightphp

Méthodes publiques

Свойство Type Description
$_globals array

Méthodes publiques

Méthode Description
__construct ( $engineName = "mysql" )
delete ( string | array | object $table, string | array | object $condition ) : integer | boolean delete
error ( )
execute ( string $sql ) : boolean | integer | array
init ( array | object $params ) construct
insert ( string | array | object $table, string | array | object $item = "", boolean $isreplace = false, boolean $isdelayed = false, string | array | object $update = [] ) : integer | boolean insert
select ( string | array | object $table, string | array | object $condition = "", string | array | object $item = "", string | array | object $groupby = "", string | array | object $orderby = "", string | array | object $leftjoin = "" ) : DbData select data from db
selectOne ( $table, $condition = "", $item = "", $groupby = "", $orderby = "", $leftjoin = "" ) select one from select result
setCount ( $count ) is count
setLimit ( $limit ) page size
setPage ( $page ) page number
update ( string | array | object $table, string | array | object $condition, string | array | object $item ) : integer | boolean update data

Private Methods

Méthode Description
__addsqlslashes ( $k )
__array2string ( $mixed, $alais = false )
__query ( string $sql ) : Array query
__quote ( $condition, $split = "AND" )
__setEngine ( $engineName )

Method Details

__construct() public méthode

public __construct ( $engineName = "mysql" )

delete() public méthode

delete
public delete ( string | array | object $table, string | array | object $condition ) : integer | boolean
$table string | array | object
$condition string | array | object
Résultat integer | boolean

error() public méthode

public error ( )

execute() public méthode

public execute ( string $sql ) : boolean | integer | array
$sql string
Résultat boolean | integer | array

init() public méthode

construct
public init ( array | object $params )
$params array | object

insert() public méthode

insert
public insert ( string | array | object $table, string | array | object $item = "", boolean $isreplace = false, boolean $isdelayed = false, string | array | object $update = [] ) : integer | boolean
$table string | array | object
$item string | array | object
$isreplace boolean
$isdelayed boolean
$update string | array | object
Résultat integer | boolean int(lastInsertId or affectedRows)

select() public méthode

select data from db
public select ( string | array | object $table, string | array | object $condition = "", string | array | object $item = "", string | array | object $groupby = "", string | array | object $orderby = "", string | array | object $leftjoin = "" ) : DbData
$table string | array | object
$condition string | array | object
$item string | array | object
$groupby string | array | object
$orderby string | array | object
$leftjoin string | array | object
Résultat DbData object || Boolean false

selectOne() public méthode

select one from select result
public selectOne ( $table, $condition = "", $item = "", $groupby = "", $orderby = "", $leftjoin = "" )

setCount() public méthode

is count
public setCount ( $count )

setLimit() public méthode

page size
public setLimit ( $limit )

setPage() public méthode

page number
public setPage ( $page )

update() public méthode

update data
public update ( string | array | object $table, string | array | object $condition, string | array | object $item ) : integer | boolean
$table string | array | object
$condition string | array | object
$item string | array | object
Résultat integer | boolean

Property Details

$_globals static_oe public_oe property

static public array $_globals
Résultat array