Db/Statement/Sqlsrv.php
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: Sqlsrv.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Db_Statement_Sqlsrv
Package: Zend\Db\StatementExtends for Microsoft SQL Server Driver for PHP
- 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
Methods



_bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : boolBinds 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
Throws



_execute(array $params = null) : boolExecutes a prepared statement.
Parameters
| Name |
Type |
Description |
| $params |
array |
OPTIONAL Values to bind to parameter placeholders. |
Returns
Throws



_prepare(string $sql) : voidPrepares statement handle
Parameters
| Name |
Type |
Description |
| $sql |
string |
|
Throws



bindColumn(string $column, mixed $param, mixed $type = null) : bool
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
Throws



bindParam(mixed $parameter, mixed $variable, mixed $type = null, mixed $length = null, mixed $options = null) : bool
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
Throws



bindValue(mixed $parameter, mixed $value, mixed $type = null) : bool
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
Throws



columnCount() : intReturns 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



errorCode() : stringRetrieves the error code, if any, associated with the last operation on
the statement handle.
Returns
| Type |
Description |
| string |
error code. |
Throws



execute(array $params = null) : bool
Parameters
| Name |
Type |
Description |
| $params |
array |
OPTIONAL Values to bind to parameter placeholders. |
Returns
Throws



fetch(int $style = null, int $cursor = null, int $offset = null) : mixedFetches 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



fetchAll(int $style = null, int $col = null) : arrayReturns an array containing all of the result set rows.
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. Behaves like parent, but if limit() is used, the final result removes the extra column 'zend_db_rownum' |
Throws



fetchColumn(int $col = 0) : stringReturns a single column from the next row of a result set.
Parameters
| Name |
Type |
Description |
| $col |
int |
OPTIONAL Position of the column to fetch. |
Returns
Throws



fetchObject(string $class = 'stdClass', array $config = array()) : mixedFetches the next row and returns it as an object.
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. |
Throws



getAttribute(string $key) : mixed
Parameters
| Name |
Type |
Description |
| $key |
string |
Attribute name. |
Returns
| Type |
Description |
| mixed |
Attribute value. |
Throws



getColumnMeta(int $column) : mixedReturns metadata for a column in a result set.
Parameters
| Name |
Type |
Description |
| $column |
int |
|
Returns
Throws



nextRowset() : boolRetrieves 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
Throws



rowCount() : intReturns 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



setAttribute(string $key, mixed $val) : bool
Parameters
| Name |
Type |
Description |
| $key |
string |
Attribute name. |
| $val |
mixed |
Attribute value. |
Returns
Throws



setFetchMode(int $mode) : bool
Parameters
| Name |
Type |
Description |
| $mode |
int |
The fetch mode. |
Returns
Throws