Inheritances
Files
Overview
FRAMES
NO FRAMES

Class Zend_Db_Statement_Sqlsrv

Zend_Db_Statement
|
Zend_Db_Statement_Sqlsrv
Zend_Db
|-Zend_Db_Statement
|- class Zend_Db_Statement_Sqlsrv extends Zend_Db_Statement
Defined in line 36 of file Db/Statement/Sqlsrv.php.
Extends for Microsoft SQL Server Driver for PHP
CategoryZend
PackageZend_Db
SubpackageStatement
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Instance fields
# $_executed Query executed
# $_keys Column names
# $_originalSQL The connection_stmt object original string
# $_stmt The connection_stmt object
Instance methods
# _bindParam() Binds a parameter to the specified variable name
+ _execute() Executes a prepared statement
# _prepare() Prepares statement handle
+ closeCursor() Closes the cursor, allowing the statement to be executed again
+ columnCount() Returns the number of columns in the result set.
+ errorCode() Retrieves the error code, if any, associated with the last operation on
+ errorInfo() Retrieves an array of error information, if any, associated with the
+ fetch() Fetches a row from the result set
+ fetchColumn() Returns a single column from the next row of a result set
+ fetchObject() Fetches the next row and returns it as an object
+ getColumnMeta() Returns metadata for a column in a result set
+ nextRowset() Retrieves the next rowset (result set) for a SQL statement that has
+ rowCount() Returns the number of rows affected by the execution of the

Details

Instance fields

$_executed
protected $_executed = false
Query executed
$_keys
protected $_keys
Column names.
$_originalSQL
protected $_originalSQL
The connection_stmt object original string.
$_stmt
protected $_stmt
The connection_stmt object.

Instance methods

_bindParam()
protected function _bindParam( $parameter
&$variable
$type = null
$length = null
$options = null
)
Binds a parameter to the specified variable name.
Parameters
mixed $parameter Name the parameter, either integer or string.
mixed $variable Reference to PHP variable containing the value.
mixed $type OPTIONAL Datatype of SQL parameter.
mixed $length OPTIONAL Length of SQL parameter.
mixed $options OPTIONAL Other options.
Returns bool
_execute()
public function _execute( array $params = null)
Executes a prepared statement.
Parameters
array $params
Returns bool
_prepare()
protected function _prepare( $sql)
Prepares statement handle
Parameters
string $sql
Returns void
closeCursor()
public function closeCursor( )
Closes the cursor, allowing the statement to be executed again.
Returns bool
columnCount()
public function 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.
errorCode()
public function errorCode( )
Retrieves the error code, if any, associated with the last operation on
the statement handle.
Returns string error code.
errorInfo()
public function errorInfo( )
Retrieves an array of error information, if any, associated with the
last operation on the statement handle.
Returns array
fetch()
public function fetch( $style = null
$cursor = null
$offset = null
)
Fetches a row from the result set.
Parameters
int $style OPTIONAL Fetch mode for this fetch operation.
int $cursor OPTIONAL Absolute, relative, or other.
int $offset OPTIONAL Number for absolute or relative cursors.
Returns mixed Array, object, or scalar depending on fetch mode.
fetchColumn()
public function fetchColumn( $col)
Returns a single column from the next row of a result set.
Parameters
int $col OPTIONAL Position of the column to fetch.
Returns string
fetchObject()
public function fetchObject( $class = 'stdClass'
array $config = array()
)
Fetches the next row and returns it as an object.
Parameters
string $class OPTIONAL Name of the class to create.
array $config
Returns mixed One object instance of the specified class.
getColumnMeta()
public function getColumnMeta( $column)
Returns metadata for a column in a result set.
Parameters
int $column
Returns mixed
nextRowset()
public function 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
rowCount()
public function 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.