Db/Statement/Mysqli.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Db  
Subpackage
Statement  
Version
$Id: Mysqli.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Db_Statement_Mysqli

Package: Zend\Db\Statement

Extends for Mysqli

Parent(s)
\Zend_Db_Statement
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_Db_Adapter_Abstract $_adapter = null
inherited

Inherited from: \Zend_Db_Statement::$$_adapter
Default valuenullDetails
Type
\Zend_Db_Adapter_Abstract
Inherited_from
\Zend_Db_Statement::$$_adapter  
Propertyprotectedarray $_attribute = array()
inherited

Attributes.

Inherited from: \Zend_Db_Statement::$$_attribute
Default valuearray()Details
Type
array
Inherited_from
\Zend_Db_Statement::$$_attribute  
Propertyprotectedarray $_bindColumn = array()
inherited

Column result bindings.

Inherited from: \Zend_Db_Statement::$$_bindColumn
Default valuearray()Details
Type
array
Inherited_from
\Zend_Db_Statement::$$_bindColumn  
Propertyprotectedarray $_bindParam = array()
inherited

Query parameter bindings; covers bindParam() and bindValue().

Inherited from: \Zend_Db_Statement::$$_bindParam
Default valuearray()Details
Type
array
Inherited_from
\Zend_Db_Statement::$$_bindParam  
Propertyprotectedinteger $_fetchMode = \Zend_Db::FETCH_ASSOC
inherited

The current fetch mode.

Inherited from: \Zend_Db_Statement::$$_fetchMode
Default value\Zend_Db::FETCH_ASSOCDetails
Type
integer
Inherited_from
\Zend_Db_Statement::$$_fetchMode  
Propertyprotectedarray $_keys =

Column names.

Details
Type
array
Propertyprotectedarray $_meta = null

Default valuenullDetails
Type
array
Propertyprotected\Zend_Db_Profiler_Query $_queryId = null
inherited

Inherited from: \Zend_Db_Statement::$$_queryId
Default valuenullDetails
Type
\Zend_Db_Profiler_Query
Inherited_from
\Zend_Db_Statement::$$_queryId  
Propertyprotectedarray $_sqlParam = array()
inherited

Parameter placeholders in the SQL string by position in the split array.

Inherited from: \Zend_Db_Statement::$$_sqlParam
Default valuearray()Details
Type
array
Inherited_from
\Zend_Db_Statement::$$_sqlParam  
Propertyprotectedarray $_sqlSplit = array()
inherited

SQL string split into an array at placeholders.

Inherited from: \Zend_Db_Statement::$$_sqlSplit
Default valuearray()Details
Type
array
Inherited_from
\Zend_Db_Statement::$$_sqlSplit  
Propertyprotectedresource|object $_stmt = null
inherited

<p>The driver level statement object/resource</p> Inherited from: \Zend_Db_Statement::$$_stmt
Default valuenullDetails
Type
resource | object
Inherited_from
\Zend_Db_Statement::$$_stmt  
Propertyprotectedarray $_values =

Fetched result values.

Details
Type
array

Methods

methodpublic__construct(\Zend_Db_Adapter_Abstract $adapter, mixed $sql) : void
inherited

Constructor for a statement.

Inherited from: \Zend_Db_Statement::__construct()
Parameters
Name Type Description
$adapter \Zend_Db_Adapter_Abstract
$sql mixed

Either a string or Zend_Db_Select.

methodprotected_bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : bool

Binds a parameter to the specified variable name.

Parameters
Name Type Description
$parameter mixed

Name the parameter, either integer or string.

$variable mixed

Reference to PHP variable containing the value.

$type mixed

OPTIONAL Datatype of SQL parameter.

$length mixed

OPTIONAL Length of SQL parameter.

$options mixed

OPTIONAL Other options.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Mysqli_Exception
methodpublic_execute(array $params = null) : bool

Executes a prepared statement.

Parameters
Name Type Description
$params array

OPTIONAL Values to bind to parameter placeholders.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Mysqli_Exception
methodpublic_fetchBound(array $row) : bool
inherited

Helper function to map retrieved row to bound column variables

Inherited from: \Zend_Db_Statement::_fetchBound()
Parameters
Name Type Description
$row array
Returns
Type Description
bool True
methodprotected_parseParameters(string $sql) : void
inherited

Inherited from: \Zend_Db_Statement::_parseParameters()
Parameters
Name Type Description
$sql string
methodpublic_prepare(string $sql) : void

Internal method called by abstract statment constructor to setup the driver level statement

Parameters
Name Type Description
$sql string
Throws
Exception Description
\Zend_Db_Statement_Mysqli_Exception
methodprotected_stripQuoted(string $sql) : string
inherited

Remove parts of a SQL string that contain quoted strings of values or identifiers.

Inherited from: \Zend_Db_Statement::_stripQuoted()
Parameters
Name Type Description
$sql string
Returns
Type Description
string
methodpublicbindColumn(string $column, mixed $param, mixed $type = null) : bool
inherited

Bind a column of the statement result set to a PHP variable.

Inherited from: \Zend_Db_Statement::bindColumn()
Parameters
Name Type Description
$column string

Name the column in the result set, either by position or by name.

$param mixed

Reference to the PHP variable containing the value.

$type mixed

OPTIONAL

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicbindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : bool
inherited

Binds a parameter to the specified variable name.

Inherited from: \Zend_Db_Statement::bindParam()
Parameters
Name Type Description
$parameter mixed

Name the parameter, either integer or string.

$variable mixed

Reference to PHP variable containing the value.

$type mixed

OPTIONAL Datatype of SQL parameter.

$length mixed

OPTIONAL Length of SQL parameter.

$options mixed

OPTIONAL Other options.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicbindValue(mixed $parameter, mixed $value, mixed $type = null) : bool
inherited

Binds a value to a parameter.

Inherited from: \Zend_Db_Statement::bindValue()
Parameters
Name Type Description
$parameter mixed

Name the parameter, either integer or string.

$value mixed

Scalar value to bind to the parameter.

$type mixed

OPTIONAL Datatype of the parameter.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicclose() : bool

Closes the cursor and the statement.

Returns
Type Description
bool
methodpubliccloseCursor() : bool

Closes the cursor, allowing the statement to be executed again.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpubliccolumnCount() : int

Returns the number of columns in the result set.

Returns null if the statement has no result set metadata.

Returns
Type Description
int The number of columns.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicerrorCode() : string

Retrieves the error code, if any, associated with the last operation on the statement handle.

Returns
Type Description
string error code.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicerrorInfo() : array

Retrieves an array of error information, if any, associated with the last operation on the statement handle.

Returns
Type Description
array
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicexecute(array $params = null) : bool
inherited

Executes a prepared statement.

Inherited from: \Zend_Db_Statement::execute()
Parameters
Name Type Description
$params array

OPTIONAL Values to bind to parameter placeholders.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicfetch(int $style = null, int $cursor = null, int $offset = null) : mixed

Fetches a row from the result set.

Parameters
Name Type Description
$style int

OPTIONAL Fetch mode for this fetch operation.

$cursor int

OPTIONAL Absolute, relative, or other.

$offset int

OPTIONAL Number for absolute or relative cursors.

Returns
Type Description
mixed Array, object, or scalar depending on fetch mode.
Throws
Exception Description
\Zend_Db_Statement_Mysqli_Exception
methodpublicfetchAll(int $style = null, int $col = null) : array
inherited

Returns an array containing all of the result set rows.

Inherited from: \Zend_Db_Statement::fetchAll()
Parameters
Name Type Description
$style int

OPTIONAL Fetch mode.

$col int

OPTIONAL Column number, if fetch mode is by column.

Returns
Type Description
array Collection of rows, each in a format by the fetch mode.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicfetchColumn(int $col = 0) : string
inherited

Returns a single column from the next row of a result set.

Inherited from: \Zend_Db_Statement::fetchColumn()
Parameters
Name Type Description
$col int

OPTIONAL Position of the column to fetch.

Returns
Type Description
string One value from the next row of result set, or false.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicfetchObject(string $class = 'stdClass', array $config = array()) : mixed
inherited

Fetches the next row and returns it as an object.

Inherited from: \Zend_Db_Statement::fetchObject()
Parameters
Name Type Description
$class string

OPTIONAL Name of the class to create.

$config array

OPTIONAL Constructor arguments for the class.

Returns
Type Description
mixed One object instance of the specified class, or false.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicgetAdapter() : \Zend_Db_Adapter_Abstract
inherited

Gets the Zend_Db_Adapter_Abstract for this particular Zend_Db_Statement object.

Inherited from: \Zend_Db_Statement::getAdapter()
Returns
Type Description
\Zend_Db_Adapter_Abstract
methodpublicgetAttribute(string $key) : mixed
inherited

Retrieve a statement attribute.

Inherited from: \Zend_Db_Statement::getAttribute()
Parameters
Name Type Description
$key string

Attribute name.

Returns
Type Description
mixed Attribute value.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicgetDriverStatement() : \unknown_type
inherited

Gets the resource or object setup by the _parse

Inherited from: \Zend_Db_Statement::getDriverStatement()
Returns
Type Description
\unknown_type
methodpublicnextRowset() : bool

Retrieves the next rowset (result set) for a SQL statement that has multiple result sets.

An example is a stored procedure that returns the results of multiple queries.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Mysqli_Exception
methodpublicrowCount() : int

Returns the number of rows affected by the execution of the last INSERT, DELETE, or UPDATE statement executed by this statement object.

Returns
Type Description
int The number of rows affected.
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicsetAttribute(string $key, mixed $val) : bool
inherited

Set a statement attribute.

Inherited from: \Zend_Db_Statement::setAttribute()
Parameters
Name Type Description
$key string

Attribute name.

$val mixed

Attribute value.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
methodpublicsetFetchMode(int $mode) : bool
inherited

Set the default fetch mode for this statement.

Inherited from: \Zend_Db_Statement::setFetchMode()
Parameters
Name Type Description
$mode int

The fetch mode.

Returns
Type Description
bool
Throws
Exception Description
\Zend_Db_Statement_Exception
Documentation was generated by phpDocumentor 2.0.0a8.