Stud.IP  2.3 Revision 48548
 All Data Structures Namespaces Files Functions Variables Groups Pages
StudipPDO Class Reference
Inheritance diagram for StudipPDO:
Inheritance graph
Collaboration diagram for StudipPDO:
Collaboration graph

Public Member Functions

 quote ($value, $type=NULL)
 exec ($statement)
 query ($statement, $mode=NULL, $arg1=NULL, $arg2=NULL)
 prepare ($statement, $driver_options=array())
 prepareStatement ($statement, $driver_options=array())

Data Fields

const PARAM_ARRAY = 100
const PARAM_COLUMN = 101

Protected Member Functions

 verify ($statement)

Static Protected Member Functions

static replaceStrings ($statement)

Detailed Description

This is a special variant of the standard PDO class that does not allow multiple statement execution.

Member Function Documentation

exec (   $statement)

Executes an SQL statement and returns the number of affected rows.

Parameters
stringSQL statement
Returns
int number of affected rows

Here is the call graph for this function:

prepare (   $statement,
  $driver_options = array() 
)

Prepares a statement for execution and returns a statement object.

Parameters
stringSQL statement
Returns
object PDOStatement object

Here is the call graph for this function:

Here is the caller graph for this function:

prepareStatement (   $statement,
  $driver_options = array() 
)

This method is intended only for use by the StudipPDOStatement class.

Parameters
stringSQL statement
Returns
object PDOStatement object

Here is the call graph for this function:

query (   $statement,
  $mode = NULL,
  $arg1 = NULL,
  $arg2 = NULL 
)

Executes an SQL statement, returning a result set as a statement object.

Parameters
stringSQL statement
intfetch mode (optional)
mixedfetch mode parameter (see PDOStatement::setFetchMode)
mixedfetch mode parameter (see PDOStatement::setFetchMode)
Returns
object PDOStatement object

Here is the call graph for this function:

quote (   $value,
  $type = NULL 
)

Quotes the given value in a form appropriate for the type. If no explicit type is given, the value's PHP type is used.

Parameters
stringPHP value to quote
intparameter type (e.g. PDO::PARAM_STR)
Returns
string quoted SQL string
static replaceStrings (   $statement)
staticprotected

Replaces all string literals in the statement with placeholders.

Parameters
stringSQL statement
Returns
string modified SQL statement
verify (   $statement)
protected

Verifies that the given SQL query only contains a single statement.

Parameters
stringSQL statement to check
Exceptions
PDOExceptionwhen the query contains multiple statements

Here is the caller graph for this function:

Field Documentation

const PARAM_ARRAY = 100
const PARAM_COLUMN = 101

The documentation for this class was generated from the following file: