PHP Class NukeViet\Core\Database

Inheritance: extends pdo
Mostrar archivo Open project: nukeviet/nukeviet

Public Properties

Property Type Description
$connect
$dbname
$dbtype
$server
$user

Public Methods

Method Description
__construct ( array $config )
affected_rows_count ( mixed $_sql, mixed $data = [] ) Database::affected_rows_count() Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE query
columns_add ( string $table, string $column, string $type, integer $length = null, boolean $null = true, string $default = null )
columns_array ( string $table ) : array
dblikeescape ( mixed $value )
from ( string $from = '' ) : Database from for the query.
group ( string $group = '' ) : Database group for the query.
having ( string $having = '' ) : Database having for the query.
insert_id ( $_sql, string $column = '', array $data = [] ) : integer | false Insert a row into the database return primary key column
join ( $join_table_on ) : Database join for the query.
limit ( integer $limit ) : Database sets the limit for the query.
offset ( integer $offset ) : Database sets the offset for the query.
order ( string $order = '' ) : Database order for the query.
select ( string $select = '' ) : Database select for the query.
sql ( )
sqlreset ( ) : Database reset query.
where ( string $where = '' ) : Database where for the query.

Method Details

__construct() public method

public __construct ( array $config )
$config array

affected_rows_count() public method

Database::affected_rows_count() Get the number of affected rows by the last INSERT, UPDATE, REPLACE or DELETE query
public affected_rows_count ( mixed $_sql, mixed $data = [] )
$_sql mixed
$data mixed

columns_add() public method

public columns_add ( string $table, string $column, string $type, integer $length = null, boolean $null = true, string $default = null )
$table string
$column string
$type string
$length integer
$null boolean
$default string

columns_array() public method

public columns_array ( string $table ) : array
$table string
return array

dblikeescape() public method

public dblikeescape ( mixed $value )
$value mixed

from() public method

from for the query.
public from ( string $from = '' ) : Database
$from string
return Database $this

group() public method

group for the query.
public group ( string $group = '' ) : Database
$group string
return Database $this

having() public method

having for the query.
public having ( string $having = '' ) : Database
$having string
return Database $this

insert_id() public method

Insert a row into the database return primary key column
public insert_id ( $_sql, string $column = '', array $data = [] ) : integer | false
$column string The name of the primary key column
$data array
return integer | false

join() public method

join for the query.
public join ( $join_table_on ) : Database
return Database $this

limit() public method

sets the limit for the query.
public limit ( integer $limit ) : Database
$limit integer
return Database $this

offset() public method

sets the offset for the query.
public offset ( integer $offset ) : Database
$offset integer
return Database $this

order() public method

order for the query.
public order ( string $order = '' ) : Database
$order string
return Database $this

select() public method

select for the query.
public select ( string $select = '' ) : Database
$select string
return Database $this

sql() public method

public sql ( )

sqlreset() public method

reset query.
public sqlreset ( ) : Database
return Database $this

where() public method

where for the query.
public where ( string $where = '' ) : Database
$where string
return Database $this

Property Details

$connect public_oe property

public $connect

$dbname public_oe property

public $dbname

$dbtype public_oe property

public $dbtype

$server public_oe property

public $server

$user public_oe property

public $user