[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/MDB/ -> mssql.php (sommaire)

(pas de description)

Poids: 1425 lignes (52 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 1 fichier
 MDB/Common.php

Définit 1 class

MDB_mssql:: (42 méthodes):
  MDB_mssql()
  errorNative()
  mssqlRaiseError()
  quoteIdentifier()
  autoCommit()
  commit()
  rollback()
  _doQuery()
  connect()
  _close()
  standaloneQuery()
  query()
  getColumnNames()
  numCols()
  endOfResult()
  fetch()
  fetchClob()
  fetchBlob()
  convertResult()
  numRows()
  freeResult()
  getIntegerDeclaration()
  getTextDeclaration()
  getClobDeclaration()
  getBlobDeclaration()
  getBooleanDeclaration()
  getDateDeclaration()
  getTimestampDeclaration()
  getTimeDeclaration()
  getFloatDeclaration()
  getDecimalDeclaration()
  getClobValue()
  freeClobValue()
  getBlobValue()
  freeBlobValue()
  getBooleanValue()
  getFloatValue()
  getDecimalValue()
  nextId()
  fetchInto()
  tableInfo()
  _mssql_field_flags()


Classe: MDB_mssql  - X-Ref

MDB MSSQL Server driver

Notes:
- Until at least version 6.5, the only kind of table changes that the
ALTER TABLE SQL statement of Microsoft SQL server supports is new field

- The driver alterTable method does not implement table or column renaming,
column definitions changes or column dropping. In the future versions of
this driver those capabilities may be emulated using other SQL statements
to recreate the tables with a new definition.

MDB_Manager_mssql::getTableFieldDefinition() is still alpha quality

MDB_mssql()   X-Ref
Constructor


errorNative()   X-Ref
Get the native error code of the last error (if any) that
occured on the current connection.

return: int native FrontBase error code

mssqlRaiseError($errno = NULL, $message = NULL)   X-Ref
This method is used to communicate an error and invoke error
callbacks etc.  Basically a wrapper for MDB::raiseError
that checks for native error msgs.

param: string  $message userinfo message
param: integer $errno error code
return: object a PEAR error object

quoteIdentifier($str)   X-Ref
Quote a string so it can be safely used as a table / column name

Quoting style depends on which database driver is being used.

param: string $str  identifier name to be quoted
return: string  quoted identifier string

autoCommit($auto_commit)   X-Ref
Define whether database changes done on the database be automatically
committed. This function may also implicitly start or end a transaction.

param: boolean $auto_commit    flag that indicates whether the database
return: mixed MDB_OK on success, a MDB error on failure

commit()   X-Ref
Commit the database changes done during a transaction that is in
progress. This function may only be called when auto-committing is
disabled, otherwise it will fail. Therefore, a new transaction is
implicitly started after committing the pending changes.

return: mixed MDB_OK on success, a MDB error on failure

rollback()   X-Ref
Cancel any database changes done during a transaction that is in
progress. This function may only be called when auto-committing is
disabled, otherwise it will fail. Therefore, a new transaction is
implicitly started after canceling the pending changes.

return: mixed MDB_OK on success, a MDB error on failure

_doQuery($query)   X-Ref
Pas de description

connect()   X-Ref
Connect to the database

return: TRUE on success, MDB_Error on failure

_close()   X-Ref
all the RDBMS specific things needed close a DB connection

return: boolean

standaloneQuery($query)   X-Ref
Pas de description

query($query, $types = NULL)   X-Ref
Send a query to the database and return any results

param: string  $query  the SQL query
param: mixed   $types  array that contains the types of the columns in
return: mixed a result handle or MDB_OK on success, a MDB error on failure

getColumnNames($result)   X-Ref
Retrieve the names of columns returned by the DBMS in a query result.

param: resource   $result    result identifier
return: mixed                an associative array variable

numCols($result)   X-Ref
Count the number of columns returned by the DBMS in a query result.

param: resource    $result        result identifier
return: mixed integer value with the number of columns, a MDB error

endOfResult($result)   X-Ref
check if the end of the result set has been reached

param: resource    $result result identifier
return: mixed TRUE or FALSE on sucess, a MDB error on failure

fetch($result, $row, $field)   X-Ref
fetch value from a result set

param: resource    $result result identifier
param: int    $row    number of the row where the data can be found
param: int    $field    field number where the data can be found
return: mixed string on success, a MDB error on failure

fetchClob($result, $row, $field)   X-Ref
fetch a clob value from a result set

param: resource    $result result identifier
param: int    $row    number of the row where the data can be found
param: int    $field    field number where the data can be found
return: mixed content of the specified data cell, a MDB error on failure,

fetchBlob($result, $row, $field)   X-Ref
fetch a blob value from a result set

param: resource    $result result identifier
param: int    $row    number of the row where the data can be found
param: int    $field    field number where the data can be found
return: mixed content of the specified data cell, a MDB error on failure

convertResult($value, $type)   X-Ref
convert a value to a RDBMS indepdenant MDB type

param: mixed  $value   value to be converted
param: int    $type    constant that specifies which type to convert to
return: mixed converted value

numRows($result)   X-Ref
returns the number of rows in a result object

param: ressource $result a valid result ressouce pointer
return: mixed MDB_Error or the number of rows

freeResult($result)   X-Ref
Free the internal resources associated with $result.

param: $result result identifier
return: boolean TRUE on success, FALSE if $result is invalid

getIntegerDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an integer type
field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getTextDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an text type
field to be used in statements like CREATE TABLE.

param: string $name name the field to be declared.
param: string $field associative array with the name of the properties
return: string DBMS specific SQL code portion that should be used to

getClobDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an character
large object type field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the
return: string  DBMS specific SQL code portion that should be used to

getBlobDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an binary large
object type field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getBooleanDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare a boolean type
field to be used in statements like CREATE TABLE.

param: string $name name the field to be declared.
param: string $field associative array with the name of the properties
return: string DBMS specific SQL code portion that should be used to

getDateDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an date type
field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getTimestampDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an timestamp
type field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getTimeDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an time type
field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getFloatDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an float type
field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getDecimalDeclaration($name, $field)   X-Ref
Obtain DBMS specific SQL code portion needed to declare an decimal type
field to be used in statements like CREATE TABLE.

param: string  $name   name the field to be declared.
param: string  $field  associative array with the name of the properties
return: string  DBMS specific SQL code portion that should be used to

getClobValue($prepared_query, $parameter, $clob)   X-Ref
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

param: resource  $prepared_query query handle from prepare()
param: $parameter
param: $clob
return: string  text string that represents the given argument value in

freeClobValue($prepared_query, $clob)   X-Ref
free a character large object

param: resource  $prepared_query query handle from prepare()
param: string    $clob
return: MDB_OK

getBlobValue($prepared_query, $parameter, $blob)   X-Ref
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

param: resource  $prepared_query query handle from prepare()
param: $parameter
param: $blob
return: string  text string that represents the given argument value in

freeBlobValue($prepared_query, $blob)   X-Ref
free a binary large object

param: resource  $prepared_query query handle from prepare()
param: string    $blob
return: MDB_OK

getBooleanValue($value)   X-Ref
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

param: string $value text string value that is intended to be converted.
return: string text string that represents the given argument value in

getFloatValue($value)   X-Ref
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

param: string  $value text string value that is intended to be converted.
return: string  text string that represents the given argument value in

getDecimalValue($value)   X-Ref
Convert a text value into a DBMS specific format that is suitable to
compose query statements.

param: string  $value text string value that is intended to be converted.
return: string  text string that represents the given argument value in

nextId($seq_name, $ondemand = TRUE)   X-Ref
returns the next free id of a sequence

param: string  $seq_name name of the sequence
param: boolean $ondemand when true the seqence is
return: mixed MDB_Error or id

fetchInto($result, $fetchmode = MDB_FETCHMODE_DEFAULT, $rownum = NULL)   X-Ref
Fetch a row and insert the data into an existing array.

param: resource  $result     result identifier
param: int       $fetchmode  how the array data should be indexed
param: int       $rownum     the row number to fetch
return: int data array on success, a MDB error on failure

tableInfo($result, $mode = NULL)   X-Ref
Returns information about a table or a result set

NOTE: doesn't support table name and flags if called from a db_result

param: mixed $resource SQL Server result identifier or table name
param: int $mode A valid tableInfo mode (MDB_TABLEINFO_ORDERTABLE or
return: array An array with all the information

_mssql_field_flags($table, $column)   X-Ref
Get the flags for a field, currently only supports "isnullable" and "primary_key"

param: string The table name
param: string The field



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7