[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/database/src/Sqlsrv/ -> SqlsrvStatement.php (summary)

Part of the Joomla Framework Database Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 586 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SqlsrvStatement:: (13 methods):
  __construct()
  prepareParameterKeyMapping()
  bindParam()
  bindValue()
  closeCursor()
  errorCode()
  errorInfo()
  execute()
  fetch()
  fetchColumn()
  prepare()
  rowCount()
  setFetchMode()


Class: SqlsrvStatement  - X-Ref

SQL Server Database Statement.

This class is modeled on \Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement

__construct($connection, string $query)   X-Ref
Constructor.

param: resource  $connection  The database connection resource
param: string    $query       The query this statement will process

prepareParameterKeyMapping($sql)   X-Ref
Replace named parameters with numbered parameters

param: string  $sql  The SQL statement to prepare.
return: string  The processed SQL statement.

bindParam($parameter, &$variable, string $dataType = ParameterType::STRING, ?int $length = null, ?array $driverOptions = null)   X-Ref
Binds a parameter to the specified variable name.

param: string|integer  $parameter       Parameter identifier. For a prepared statement using named placeholders, this will be a parameter
param: mixed           $variable        Name of the PHP variable to bind to the SQL statement parameter.
param: string          $dataType        Constant corresponding to a SQL datatype, this should be the processed type from the QueryInterface.
param: integer         $length          The length of the variable. Usually required for OUTPUT parameters.
param: array           $driverOptions   Optional driver options to be used.
return: boolean

bindValue($parameter, $variable, $dataType = ParameterType::STRING)   X-Ref
Binds a value to the specified variable.

param: string|integer  $parameter       Parameter identifier. For a prepared statement using named placeholders, this will be a parameter
param: mixed           $variable        Name of the PHP variable to bind to the SQL statement parameter.
param: string          $dataType        Constant corresponding to a SQL datatype, this should be the processed type from the QueryInterface.
return: void

closeCursor()   X-Ref
Closes the cursor, enabling the statement to be executed again.

return: void

errorCode()   X-Ref
Fetches the SQLSTATE associated with the last operation on the statement handle.

return: string

errorInfo()   X-Ref
Fetches extended error information associated with the last operation on the statement handle.

return: array

execute(?array $parameters = null)   X-Ref
Executes a prepared statement

param: array|null  $parameters  An array of values with as many elements as there are bound parameters in the SQL statement being executed.
return: boolean

fetch(?int $fetchStyle = null, int $cursorOrientation = FetchOrientation::NEXT, int $cursorOffset = 0)   X-Ref
Fetches the next row from a result set

param: integer|null  $fetchStyle         Controls how the next row will be returned to the caller. This value must be one of the
param: integer       $cursorOrientation  For a StatementInterface object representing a scrollable cursor, this value determines which row
param: integer       $cursorOffset       For a StatementInterface object representing a scrollable cursor for which the cursorOrientation
return: mixed  The return value of this function on success depends on the fetch type. In all cases, boolean false is returned on failure.

fetchColumn($columnIndex = 0)   X-Ref
Returns a single column from the next row of a result set

param: integer  $columnIndex  0-indexed number of the column you wish to retrieve from the row.
return: mixed  Returns a single column from the next row of a result set or boolean false if there are no more rows.

prepare()   X-Ref
Prepares the SQL Server statement resource for execution

return: resource

rowCount()   X-Ref
Returns the number of rows affected by the last SQL statement.

return: integer

setFetchMode(int $fetchMode, ...$args)   X-Ref
Sets the fetch mode to use while iterating this statement.

param: integer  $fetchMode  The fetch mode, must be one of the FetchMode constants.
param: mixed    ...$args    Optional mode-specific arguments.
return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer