[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

/Pear/DB/ -> mssql.php (sommaire)

(pas de description)

Poids: 738 lignes (23 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

DB_mssql:: (24 méthodes):
  DB_mssql()
  connect()
  disconnect()
  simpleQuery()
  nextResult()
  fetchInto()
  freeResult()
  numCols()
  numRows()
  autoCommit()
  commit()
  rollback()
  affectedRows()
  nextId()
  createSequence()
  dropSequence()
  errorNative()
  errorCode()
  mssqlRaiseError()
  tableInfo()
  getSpecialQuery()
  _mssql_field_flags()
  _add_flag()
  quoteIdentifier()


Classe: DB_mssql  - X-Ref

Database independent query interface definition for PHP's Microsoft SQL Server
extension.

DB_mssql()   X-Ref
Pas de description

connect($dsninfo, $persistent = false)   X-Ref
Pas de description

disconnect()   X-Ref
Pas de description

simpleQuery($query)   X-Ref
Pas de description

nextResult($result)   X-Ref
Move the internal mssql result pointer to the next available result

param: a valid fbsql result resource
return: true if a result is available otherwise return false

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

Formating of the array and the data therein are configurable.
See DB_result::fetchInto() for more information.

param: resource $result    query result identifier
param: array    $arr       (reference) array where data from the row
param: int      $fetchmode how the resulting array should be indexed
param: int      $rownum    the row number to fetch
return: mixed DB_OK on success, null when end of result set is

freeResult($result)   X-Ref
Pas de description

numCols($result)   X-Ref
Pas de description

numRows($result)   X-Ref
Pas de description

autoCommit($onoff = false)   X-Ref
Enable/disable automatic commits


commit()   X-Ref
Commit the current transaction.


rollback()   X-Ref
Roll back (undo) the current transaction.


affectedRows()   X-Ref
Gets the number of rows affected by the last query.
if the last query was a select, returns 0.

return: number of rows affected by the last query or DB_ERROR

nextId($seq_name, $ondemand = true)   X-Ref
Returns the next free id in a sequence

param: string  $seq_name  name of the sequence
param: boolean $ondemand  when true, the seqence is automatically
return: int  the next id number in the sequence.  DB_Error if problem.

createSequence($seq_name)   X-Ref
Creates a new sequence

param: string $seq_name  name of the new sequence
return: int  DB_OK on success.  A DB_Error object is returned if

dropSequence($seq_name)   X-Ref
Deletes a sequence

param: string $seq_name  name of the sequence to be deleted
return: int  DB_OK on success.  DB_Error if problems.

errorNative()   X-Ref
Determine MS SQL Server error code by querying @@ERROR.

return: mixed  mssql's native error code or DB_ERROR if unknown.

errorCode($nativecode = null)   X-Ref
Determine PEAR::DB error code from mssql's native codes.

If <var>$nativecode</var> isn't known yet, it will be looked up.

param: mixed  $nativecode  mssql error code, if known
return: integer  an error number from a DB error constant

mssqlRaiseError($code = null)   X-Ref
Gather information about an error, then use that info to create a
DB error object and finally return that object.

param: integer  $code  PEAR error number (usually a DB constant) if
return: object  DB error object

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

NOTE: only supports 'table' and 'flags' if <var>$result</var>
is a table name.

param: object|string  $result  DB_result object from a query or a
param: int            $mode    a valid tableInfo mode
return: array  an associative array with the information requested

getSpecialQuery($type)   X-Ref
Returns the query needed to get some backend info

param: string $type What kind of info you want to retrieve
return: string The SQL query string

_mssql_field_flags($table, $column)   X-Ref
Get the flags for a field, currently supports "not_null", "primary_key",
"auto_increment" (mssql identity), "timestamp" (mssql timestamp),
"unique_key" (mssql unique index, unique check or primary_key) and
"multiple_key" (multikey index)

mssql timestamp is NOT similar to the mysql timestamp so this is maybe
not useful at all - is the behaviour of mysql_field_flags that primary
keys are alway unique? is the interpretation of multiple_key correct?

author: Joern Barthel <j_barthel@web.de>
param: string The table name
param: string The field

_add_flag(&$array, $value)   X-Ref
Adds a string to the flags array if the flag is not yet in there
- if there is no flag present the array is created.

author: Joern Barthel <j_barthel@web.de>
param: reference  Reference to the flag-array
param: value      The flag value

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



Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7