Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Db_Statement_Interface Interface Reference
Inheritance diagram for Zend_Db_Statement_Interface:
Zend_Db_Statement Zend_Db_Statement_Db2 Zend_Db_Statement_Mysqli Zend_Db_Statement_Oracle Zend_Db_Statement_Pdo Zend_Db_Statement_Sqlsrv Mysql Zend_Db_Statement_Pdo_Ibm Zend_Db_Statement_Pdo_Oci

Public Member Functions

 bindColumn ($column, &$param, $type=null)
 
 bindParam ($parameter, &$variable, $type=null, $length=null, $options=null)
 
 bindValue ($parameter, $value, $type=null)
 
 closeCursor ()
 
 columnCount ()
 
 errorCode ()
 
 errorInfo ()
 
 execute (array $params=array())
 
 fetch ($style=null, $cursor=null, $offset=null)
 
 fetchAll ($style=null, $col=null)
 
 fetchColumn ($col=0)
 
 fetchObject ($class='stdClass', array $config=array())
 
 getAttribute ($key)
 
 nextRowset ()
 
 rowCount ()
 
 setAttribute ($key, $val)
 
 setFetchMode ($mode)
 

Detailed Description

Definition at line 32 of file Interface.php.

Member Function Documentation

◆ bindColumn()

bindColumn (   $column,
$param,
  $type = null 
)

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

Parameters
string$columnName the column in the result set, either by position or by name.
mixed$paramReference to the PHP variable containing the value.
mixed$typeOPTIONAL
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement, and Zend_Db_Statement_Pdo.

◆ bindParam()

bindParam (   $parameter,
$variable,
  $type = null,
  $length = null,
  $options = null 
)

Binds a parameter to the specified variable name.

Parameters
mixed$parameterName the parameter, either integer or string.
mixed$variableReference to PHP variable containing the value.
mixed$typeOPTIONAL Datatype of SQL parameter.
mixed$lengthOPTIONAL Length of SQL parameter.
mixed$optionsOPTIONAL Other options.
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement.

◆ bindValue()

bindValue (   $parameter,
  $value,
  $type = null 
)

Binds a value to a parameter.

Parameters
mixed$parameterName the parameter, either integer or string.
mixed$valueScalar value to bind to the parameter.
mixed$typeOPTIONAL Datatype of the parameter.
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement, and Zend_Db_Statement_Pdo.

◆ closeCursor()

closeCursor ( )

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

Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, Zend_Db_Statement_Oracle, Zend_Db_Statement_Db2, Zend_Db_Statement_Mysqli, and Zend_Db_Statement_Sqlsrv.

◆ columnCount()

columnCount ( )

Returns the number of columns in the result set. Returns null if the statement has no result set metadata.

Returns
int The number of columns.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, Zend_Db_Statement_Oracle, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Db2, and Zend_Db_Statement_Sqlsrv.

◆ errorCode()

errorCode ( )

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

Returns
string error code.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, Zend_Db_Statement_Oracle, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Db2, and Zend_Db_Statement_Sqlsrv.

◆ errorInfo()

errorInfo ( )

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

Returns
array
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, Zend_Db_Statement_Oracle, Zend_Db_Statement_Db2, Zend_Db_Statement_Mysqli, and Zend_Db_Statement_Sqlsrv.

◆ execute()

execute ( array  $params = array())

Executes a prepared statement.

Parameters
array$paramsOPTIONAL Values to bind to parameter placeholders.
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement.

◆ fetch()

fetch (   $style = null,
  $cursor = null,
  $offset = null 
)

Fetches a row from the result set.

Parameters
int$styleOPTIONAL Fetch mode for this fetch operation.
int$cursorOPTIONAL Absolute, relative, or other.
int$offsetOPTIONAL Number for absolute or relative cursors.
Returns
mixed Array, object, or scalar depending on fetch mode.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Oracle, Zend_Db_Statement_Mysqli, Zend_Db_Statement_Pdo, Zend_Db_Statement_Db2, Zend_Db_Statement_Sqlsrv, and Zend_Db_Statement_Pdo_Oci.

◆ fetchAll()

fetchAll (   $style = null,
  $col = null 
)

Returns an array containing all of the result set rows.

Parameters
int$styleOPTIONAL Fetch mode.
int$colOPTIONAL Column number, if fetch mode is by column.
Returns
array Collection of rows, each in a format by the fetch mode.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Sqlsrv, Zend_Db_Statement_Oracle, Zend_Db_Statement_Db2, Zend_Db_Statement, Zend_Db_Statement_Pdo, Zend_Db_Statement_Pdo_Oci, and Zend_Db_Statement_Pdo_Ibm.

◆ fetchColumn()

fetchColumn (   $col = 0)

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

Parameters
int$colOPTIONAL Position of the column to fetch.
Returns
string
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Oracle, Zend_Db_Statement, Zend_Db_Statement_Pdo, and Zend_Db_Statement_Sqlsrv.

◆ fetchObject()

fetchObject (   $class = 'stdClass',
array  $config = array() 
)

Fetches the next row and returns it as an object.

Parameters
string$classOPTIONAL Name of the class to create.
array$configOPTIONAL Constructor arguments for the class.
Returns
mixed One object instance of the specified class.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Oracle, Zend_Db_Statement, Zend_Db_Statement_Pdo, Zend_Db_Statement_Sqlsrv, and Zend_Db_Statement_Db2.

◆ getAttribute()

getAttribute (   $key)

Retrieve a statement attribute.

Parameters
string$keyAttribute name.
Returns
mixed Attribute value.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement, and Zend_Db_Statement_Pdo.

◆ nextRowset()

nextRowset ( )

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
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, Zend_Db_Statement_Sqlsrv, Zend_Db_Statement_Mysqli, and Zend_Db_Statement_Db2.

◆ rowCount()

rowCount ( )

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

Returns
int The number of rows affected.
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Oracle, Zend_Db_Statement_Pdo, Zend_Db_Statement_Sqlsrv, Zend_Db_Statement_Mysqli, and Zend_Db_Statement_Db2.

◆ setAttribute()

setAttribute (   $key,
  $val 
)

Set a statement attribute.

Parameters
string$keyAttribute name.
mixed$valAttribute value.
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, and Zend_Db_Statement.

◆ setFetchMode()

setFetchMode (   $mode)

Set the default fetch mode for this statement.

Parameters
int$modeThe fetch mode.
Returns
bool
Exceptions
Zend_Db_Statement_Exception

Implemented in Zend_Db_Statement_Pdo, and Zend_Db_Statement.


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