\PDOStatement_mysql

Class PDOStatement_mysql This class is used from class PDO_mysql to manage a MySQL database.

Look at PDO.clas.php file comments to know more about MySQL connection.

Summary

Methods
Properties
Constants
PDOStatement_mysql()
bindParam()
columnCount()
errorCode()
errorInfo()
execute()
fetch()
fetchAll()
fetchSingle()
fetchColumn()
rowCount()
getAttribute()
setAttribute()
setFetchMode()
bindColumn()
__setErrors()
__uquery()
$__connection
$__dbinfo
$__persistent
$__query
$__result
$__fetchmode
$__errorCode
$__errorInfo
$__boundParams
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$__connection

$__connection : 

'Private' variables: __connection:Resource Database connection __dbinfo:Array Array with 4 elements used to manage connection __persistent:Boolean Connection mode, is true on persistent, false on normal (deafult) connection __query:String Last query used __result:Resource Last result from last query __fetchmode:Integer constant PDO_FETCH_* result mode __errorCode:String Last error string code __errorInfo:Array Last error informations, code, number, details __boundParams:Array Stored bindParam

Type

$__dbinfo

$__dbinfo : 

Type

$__persistent

$__persistent : 

Type

$__query

$__query : 

Type

$__result

$__result : 

Type

$__fetchmode

$__fetchmode : 

Type

$__errorCode

$__errorCode : 

Type

$__errorInfo

$__errorInfo : 

Type

$__boundParams

$__boundParams : 

Type

Methods

PDOStatement_mysql()

PDOStatement_mysql(  $__query,   $__connection,   $__dbinfo) 

Public constructor: Called from PDO to create a PDOStatement for this database new PDOStatement_sqlite( &$__query:String, &$__connection:Resource, $__dbinfo:Array )

Parameters

$__query
$__connection
$__dbinfo

bindParam()

bindParam(  $mixed,   $variable,   $type = null,   $lenght = null) 

Public method: Replace ? or :named values to execute prepared query this->bindParam( $mixed:Mixed, &$variable:Mixed, $type:Integer, $lenght:Integer ):Void

Parameters

$mixed
$variable
$type
$lenght

columnCount()

columnCount() 

Public method: Checks if query was valid and returns how may fields returns this->columnCount( void ):Void

errorCode()

errorCode() 

Public method: Returns a code rappresentation of an error this->errorCode( void ):String

errorInfo()

errorInfo() 

Public method: Returns an array with error informations this->errorInfo( void ):Array

execute()

execute(  $array = array()) 

Public method: Excecutes a query and returns true on success or false.

this->exec( $array:Array ):Boolean

Parameters

$array

fetch()

fetch(  $mode = PDO_FETCH_ASSOC,   $cursor = null,   $offset = null) 

Public method: Returns, if present, next row of executed query or false.

this->fetch( $mode:Integer, $cursor:Integer, $offset:Integer ):Mixed

Parameters

$mode
$cursor
$offset

fetchAll()

fetchAll(  $mode = PDO_FETCH_ASSOC) 

Public method: Returns an array with all rows of executed query.

this->fetchAll( $mode:Integer ):Array

Parameters

$mode

fetchSingle()

fetchSingle() 

Public method: Returns, if present, first column of next row of executed query this->fetchSingle( void ):Mixed

fetchColumn()

fetchColumn(  $column) 

Parameters

$column

rowCount()

rowCount() 

Public method: Returns number of last affected database rows this->rowCount( void ):Integer

getAttribute()

getAttribute(  $attribute) 

Public method: Quotes correctly a string for this database this->getAttribute( $attribute:Integer ):Mixed

Parameters

$attribute

setAttribute()

setAttribute(  $attribute,   $mixed) 

Public method: Sets database attributes, in this version only connection mode.

this->setAttribute( $attribute:Integer, $mixed:Mixed ):Boolean

Parameters

$attribute
$mixed

setFetchMode()

setFetchMode(  $mode) 

Public method: Sets default fetch mode to use with this->fetch() method.

this->setFetchMode( $mode:Integer ):Boolean

Parameters

$mode

bindColumn()

bindColumn(  $mixewd,   $param,   $type = null,   $max_length = null,   $driver_option = null) 

Parameters

$mixewd
$param
$type
$max_length
$driver_option

__setErrors()

__setErrors(  $er) 

Parameters

$er

__uquery()

__uquery(  $query) 

Parameters

$query