[ Index ]
 

Code source de SPIP Agora 1.4

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

title

Body

[fermer]

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

(pas de description)

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

Définit 1 class

DB_mysqli:: (25 méthodes):
  DB_mysqli()
  connect()
  disconnect()
  simpleQuery()
  nextResult()
  fetchInto()
  freeResult()
  numCols()
  numRows()
  autoCommit()
  commit()
  rollback()
  affectedRows()
  errorNative()
  nextId()
  createSequence()
  dropSequence()
  _BCsequence()
  quoteIdentifier()
  escapeSimple()
  modifyQuery()
  modifyLimitQuery()
  mysqlRaiseError()
  tableInfo()
  getSpecialQuery()


Classe: DB_mysqli  - X-Ref

Database independent query interface definition for PHP's mysqli
extension.

This is for MySQL versions 4.1 and above.  Requires PHP 5.

Note that persistent connections no longer exist.

DB_mysqli()   X-Ref
DB_mysql constructor.


connect($dsninfo, $persistent = false)   X-Ref
Connect to a database and log in as the specified user.

param: string $dsn the data source name (see DB::parseDSN for syntax)
param: boolean $persistent (optional) whether the connection should
return: mixed DB_OK on success, a DB error on failure

disconnect()   X-Ref
Log out and disconnect from the database.

return: boolean true on success, false if not connected

simpleQuery($query)   X-Ref
Send a query to MySQL and return the results as a MySQL resource
identifier.

param: string $query the SQL query
return: mixed a valid MySQL result for successful SELECT

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

This method has not been implemented yet.

param: resource $result a valid sql result resource
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
Free the internal resources associated with $result.

param: resource $result MySQL result identifier
return: bool true on success, false if $result is invalid

numCols($result)   X-Ref
Get the number of columns in a result set.

param: $result MySQL result identifier
return: int the number of columns per row in $result

numRows($result)   X-Ref
Get the number of rows in a result set.

param: resource $result MySQL result identifier
return: int the number of rows in $result

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 data manipulation
query.  For other queries, this function returns 0.

return: integer number of rows affected by the last query

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

return: int native MySQL error code

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.

_BCsequence($seqname)   X-Ref
Backwards compatibility with old sequence emulation implementation
(clean up the dupes).

param: string $seqname The sequence name to clean up
return: mixed DB_Error or true

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

Quoting style depends on which database driver is being used.

MySQL can't handle the backtick character (<kbd>`</kbd>) in
table or column names.

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

escapeSimple($str)   X-Ref
Escape a string according to the current DBMS's standards

param: string $str  the string to be escaped
return: string  the escaped string

modifyQuery($query)   X-Ref
Pas de description

modifyLimitQuery($query, $from, $count, $params = array()   X-Ref
Pas de description

mysqlRaiseError($errno = 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  $errno  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.

WARNING: this method will probably not work because the mysqli_*()
functions it relies upon may not exist.

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



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