PHP Class ezSQL_pdo

Inheritance: extends ezSQLcore
Show file Open project: jv2222/ezsql Class Usage Examples

Public Properties

Property Type Description
$dsn
$password
$rows_affected
$user

Public Methods

Method Description
__construct ( $dsn = '', $user = '', $password = '', $ssl = [] ) ******************************************************************** Constructor - allow the user to perform a quick connect at the same time as initialising the ezSQL_pdo class
catch_error ( ) ******************************************************************** Hooks into PDO error system and reports it to user
connect ( $dsn = '', $user = '', $password = '', $ssl = [] ) ******************************************************************** Try to connect to database server
escape ( $str ) ******************************************************************** Format a string correctly for safe PDO insert (no mater if magic quotes are on or not)
query ( $query ) Basic Query - see docs for more detail
quick_connect ( $dsn = '', $user = '', $password = '', $ssl = [] ) ******************************************************************** In the case of PDO quick_connect is not really needed because std. connect already does what quick connect does - but for the sake of consistency it has been included
select ( $dsn = '', $user = '', $password = '', $ssl = [] ) ******************************************************************** No real equivalent of mySQL select in PDO once again, function included for the sake of consistency
sysdate ( ) ******************************************************************** Return specific system date syntax i.e. Oracle: SYSDATE Mysql: NOW()

Method Details

__construct() public method

******************************************************************** Constructor - allow the user to perform a quick connect at the same time as initialising the ezSQL_pdo class
public __construct ( $dsn = '', $user = '', $password = '', $ssl = [] )

catch_error() public method

******************************************************************** Hooks into PDO error system and reports it to user
public catch_error ( )

connect() public method

******************************************************************** Try to connect to database server
public connect ( $dsn = '', $user = '', $password = '', $ssl = [] )

escape() public method

******************************************************************** Format a string correctly for safe PDO insert (no mater if magic quotes are on or not)
public escape ( $str )

query() public method

Basic Query - see docs for more detail
public query ( $query )

quick_connect() public method

******************************************************************** In the case of PDO quick_connect is not really needed because std. connect already does what quick connect does - but for the sake of consistency it has been included
public quick_connect ( $dsn = '', $user = '', $password = '', $ssl = [] )

select() public method

******************************************************************** No real equivalent of mySQL select in PDO once again, function included for the sake of consistency
public select ( $dsn = '', $user = '', $password = '', $ssl = [] )

sysdate() public method

******************************************************************** Return specific system date syntax i.e. Oracle: SYSDATE Mysql: NOW()
public sysdate ( )

Property Details

$dsn public property

public $dsn

$password public property

public $password

$rows_affected public property

public $rows_affected

$user public property

public $user