PHP 클래스 iaDb

Subrion - open source content management system Copyright (C) 2016 Intelliants, LLC This file is part of Subrion. Subrion is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Subrion is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Subrion. If not, see .
상속: extends abstractUtil, implements iaInterfaceDbAdapter
파일 보기 프로젝트 열기: intelliants/subrion 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$iaCore
$prefix
$tableOptions

보호된 프로퍼티들

프로퍼티 타입 설명
$_PDO
$_PDOStmt
$_counter
$_lastQuery
$_link
$_queryList
$_table
$_tableList

공개 메소드들

메소드 설명
__construct ( )
all ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $start, $limit = null, $tableName = null )
assoc ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start, $limit = null )
bind ( &$sql, $values )
cascadeDelete ( $tbl, $where = '' )
convertIds ( $ids, $columnName = 'id', $equal = true )
delete ( $condition, $tableName = null, $values = [] )
describe ( $tableName = null, $addPrefix = true )
exists ( $where, $values = [], $tableName = null )
fetchRow ( $result ) : array | null Fetches one row of data from the result set and returns it as an enumerated array
foundRows ( )
getAffected ( )
getAll ( $sql, $start, $limit )
getAssoc ( $sql, $singleRow = false )
getCount ( )
getEnumValues ( $table, $field )
getError ( ) : string Returns the error text from the last MySQL function
getErrorNumber ( )
getFieldNames ( $result ) : array | boolean Returns an array of objects which contains field definition information or FALSE if no field information is available
getInfo ( $type ) : string Returns a string that represents various information on a connected database
getInsertId ( )
getKeyValue ( $sql )
getLastQuery ( )
getMaxOrder ( $table = null, $condition = null )
getNextId ( $table = null ) Returns the ID using auto increment value for a table
getNumFields ( ) : integer Retrieves the number of fields from a query
getNumFields ( $result ) : integer Retrieves the number of fields from a query
getNumRows ( $resource )
getOne ( $sql )
getPrefix ( )
getQueriesList ( )
getRow ( $sql )
init ( )
insert ( array $values, $rawValues = null, $tableName = null )
keyvalue ( $fields = self::ALL_COLUMNS_SELECTION, $condition = null, $tableName = null, $start, $limit = null )
mysqli_result ( $result, $row, $field )
one ( $field, $condition = '', $tableName = null, $start )
one_bind ( $field, $condition, array $values, $tableName = null, $start )
onefield ( $field = self::ID_COLUMN_SELECTION, $condition = null, $start, $limit = null, $tableName = null )
orderByRand ( $max, $id_name = '`id`', $pieces = 12, $delimiter = 100 )
printf ( $pattern, array $replacements )
query ( $sql )
replace ( array $values, $rawValues = null, $tableName = null )
resetTable ( )
row ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start )
row_bind ( $fields, $condition, array $values, $tableName = null, $start )
setTable ( $tableName, $addPrefix = true )
setTimezoneOffset ( $offset )
sql ( string $string = '' ) : string Escapes string using valid connection
truncate ( $table = null )
update ( $values, $condition = null, $rawValues = null, $tableName = null )

보호된 메소드들

메소드 설명
_connect ( ) : void Creates connection to database
_get ( string $type, string | array $fields, string $condition = '', integer $start, integer | null $limit = null ) : array | boolean Converts short aliases into MySQL query format
_wrapValues ( array $values, array $rawValues ) : string Internal utility function used to generate SET stmt

메소드 상세

__construct() 공개 메소드

public __construct ( )

_connect() 보호된 메소드

Creates connection to database
protected _connect ( ) : void
리턴 void

_get() 보호된 메소드

Converts short aliases into MySQL query format
protected _get ( string $type, string | array $fields, string $condition = '', integer $start, integer | null $limit = null ) : array | boolean
$type string selection type
$fields string | array fields to be selected
$condition string condition to be used for the selection
$start integer start position
$limit integer | null number of records to be returned
리턴 array | boolean

_wrapValues() 보호된 메소드

Internal utility function used to generate SET stmt
protected _wrapValues ( array $values, array $rawValues ) : string
$values array values to be set checking by type
$rawValues array values to be set without processing
리턴 string

all() 공개 메소드

public all ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $start, $limit = null, $tableName = null )

assoc() 공개 메소드

public assoc ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start, $limit = null )

bind() 공개 메소드

public bind ( &$sql, $values )

cascadeDelete() 공개 메소드

public cascadeDelete ( $tbl, $where = '' )

convertIds() 공개 정적인 메소드

public static convertIds ( $ids, $columnName = 'id', $equal = true )

delete() 공개 메소드

public delete ( $condition, $tableName = null, $values = [] )

describe() 공개 메소드

public describe ( $tableName = null, $addPrefix = true )

exists() 공개 메소드

public exists ( $where, $values = [], $tableName = null )

fetchRow() 공개 메소드

Fetches one row of data from the result set and returns it as an enumerated array
public fetchRow ( $result ) : array | null
$result query result
리턴 array | null

foundRows() 공개 메소드

public foundRows ( )

getAffected() 공개 메소드

public getAffected ( )

getAll() 공개 메소드

public getAll ( $sql, $start, $limit )

getAssoc() 공개 메소드

public getAssoc ( $sql, $singleRow = false )

getCount() 공개 메소드

public getCount ( )

getEnumValues() 공개 메소드

public getEnumValues ( $table, $field )

getError() 공개 메소드

Returns the error text from the last MySQL function
public getError ( ) : string
리턴 string

getErrorNumber() 공개 메소드

public getErrorNumber ( )

getFieldNames() 공개 메소드

Returns an array of objects which contains field definition information or FALSE if no field information is available
public getFieldNames ( $result ) : array | boolean
$result query result
리턴 array | boolean

getInfo() 공개 메소드

Returns a string that represents various information on a connected database
public getInfo ( $type ) : string
$type information type
리턴 string

getInsertId() 공개 메소드

public getInsertId ( )

getKeyValue() 공개 메소드

public getKeyValue ( $sql )

getLastQuery() 공개 메소드

public getLastQuery ( )

getMaxOrder() 공개 메소드

public getMaxOrder ( $table = null, $condition = null )

getNextId() 공개 메소드

Returns the ID using auto increment value for a table
public getNextId ( $table = null )

getNumFields() 공개 메소드

Retrieves the number of fields from a query
public getNumFields ( ) : integer
리턴 integer

getNumFields() 공개 메소드

Retrieves the number of fields from a query
public getNumFields ( $result ) : integer
$result query result
리턴 integer

getNumRows() 공개 메소드

public getNumRows ( $resource )

getOne() 공개 메소드

public getOne ( $sql )

getPrefix() 공개 메소드

public getPrefix ( )

getQueriesList() 공개 메소드

public getQueriesList ( )

getRow() 공개 메소드

public getRow ( $sql )

init() 공개 메소드

public init ( )

insert() 공개 메소드

public insert ( array $values, $rawValues = null, $tableName = null )
$values array

keyvalue() 공개 메소드

public keyvalue ( $fields = self::ALL_COLUMNS_SELECTION, $condition = null, $tableName = null, $start, $limit = null )

mysqli_result() 공개 메소드

public mysqli_result ( $result, $row, $field )

one() 공개 메소드

public one ( $field, $condition = '', $tableName = null, $start )

one_bind() 공개 메소드

public one_bind ( $field, $condition, array $values, $tableName = null, $start )
$values array

onefield() 공개 메소드

public onefield ( $field = self::ID_COLUMN_SELECTION, $condition = null, $start, $limit = null, $tableName = null )

orderByRand() 공개 메소드

public orderByRand ( $max, $id_name = '`id`', $pieces = 12, $delimiter = 100 )

printf() 공개 정적인 메소드

public static printf ( $pattern, array $replacements )
$replacements array

query() 공개 메소드

public query ( $sql )

replace() 공개 메소드

public replace ( array $values, $rawValues = null, $tableName = null )
$values array

resetTable() 공개 메소드

public resetTable ( )

row() 공개 메소드

public row ( $fields = self::ALL_COLUMNS_SELECTION, $condition = '', $tableName = null, $start )

row_bind() 공개 메소드

public row_bind ( $fields, $condition, array $values, $tableName = null, $start )
$values array

setTable() 공개 메소드

public setTable ( $tableName, $addPrefix = true )

setTimezoneOffset() 공개 메소드

public setTimezoneOffset ( $offset )

sql() 공개 메소드

Escapes string using valid connection
public sql ( string $string = '' ) : string
$string string string to be escaped
리턴 string

truncate() 공개 메소드

public truncate ( $table = null )

update() 공개 메소드

public update ( $values, $condition = null, $rawValues = null, $tableName = null )

프로퍼티 상세

$_PDO 보호되어 있는 프로퍼티

protected $_PDO

$_PDOStmt 보호되어 있는 프로퍼티

protected $_PDOStmt

$_counter 보호되어 있는 프로퍼티

protected $_counter

$_lastQuery 보호되어 있는 프로퍼티

protected $_lastQuery

$_queryList 보호되어 있는 프로퍼티

protected $_queryList

$_table 보호되어 있는 프로퍼티

protected $_table

$_tableList 보호되어 있는 프로퍼티

protected $_tableList

$iaCore 공개적으로 프로퍼티

public $iaCore

$prefix 공개적으로 프로퍼티

public $prefix

$tableOptions 공개적으로 프로퍼티

public $tableOptions