\PdoCrud

Class provides simple CRUD operations.

Summary

Methods
Properties
Constants
connect()
select()
update()
delete()
lock()
unlock()
start_transaction()
commit()
rollback()
insert()
insert_multyple()
__destruct()
$PDO
No constants found
process_query_error()
set_query()
set_multyple_query()
lock_query()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$PDO

$PDO : 

PDO object.

Type

Methods

connect()

connect(  $ConnnectionData) 

Method connects to the database.

Parameters

$ConnnectionData

select()

select(  $Fields,   $TableNames,   $Where = '1 = 1',   $From,   $Limit = 1000000) 

Getting records.

Parameters

$Fields
$TableNames
$Where
$From
$Limit

update()

update(  $TableName,   $Record,   $Where,   $Limit = 10000000) 

Updating records.

Parameters

$TableName
$Record
$Where
$Limit

delete()

delete(  $TableName,   $Where,   $Limit = 10000000) 

Deleting records.

Parameters

$TableName
$Where
$Limit

lock()

lock(  $Tables,   $Modes) 

Method locks tables

Parameters

$Tables
$Modes

unlock()

unlock() 

Method unlocks locked tables.

start_transaction()

start_transaction() 

Method starts transaction.

commit()

commit() 

Commiting transaction.

rollback()

rollback() 

Rollback transaction.

insert()

insert(  $TableName,   $Record) 

Method inserts record.

Parameters

$TableName
$Record

insert_multyple()

insert_multyple(  $TableName,   $Records) 

Method inserts record.

Parameters

$TableName
$Records

__destruct()

__destruct() 

Method destroys connection.

process_query_error()

process_query_error(  $Result,   $Query) 

Method handles request errors.

Parameters

$Result
$Query

set_query()

set_query(  $Record) 

Method compiles set-query.

Parameters

$Record

set_multyple_query()

set_multyple_query(  $Records) 

Method compiles set-multyple-query.

Parameters

$Records

lock_query()

lock_query(  $Tables,   $Modes) 

Method compiles lock queries.

Parameters

$Tables
$Modes