[ Index ]
 

Code source de CakePHP 1.1.13.4450

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

title

Body

[fermer]

/cake/libs/model/dbo/ -> dbo_pear.php (sommaire)

{@link http://pear.php.net/package/DB PEAR::DB} layer for DBO. Long description for file

Copyright: Copyright 2005-2007, Cake Software Foundation, Inc.
License: http://www.opensource.org/licenses/mit-license.php The MIT License
Version: $Revision: 4409 $
Poids: 225 lignes (6 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

DboPear:: (12 méthodes):
  connect()
  disconnect()
  execute()
  fetchRow()
  tablesList()
  fields()
  prepareValue()
  lastError()
  lastAffected()
  lastNumRows()
  lastInsertId()
  selectLimit()


Classe: DboPear  - X-Ref

{@link http://pear.php.net/package/DB PEAR::DB} layer for DBO.

Long description for class

connect($config)   X-Ref
Connects to the database using options in the given configuration array.

param: array $config Configuration array for connecting
return: boolean True if the database could be connected, else false

disconnect()   X-Ref
Disconnects from database.

return: boolean True if the database could be disconnected, else false

execute($sql)   X-Ref
Executes given SQL statement.

param: string $sql SQL statement
return: resource Result resource identifier

fetchRow()   X-Ref
Returns a row from given resultset as an array .

return: array The fetched row as an array

tablesList()   X-Ref
Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.
:WARNING: :TODO: POSTGRESQL & MYSQL ONLY! PEAR::DB doesn't support universal table listing.

return: array Array of tablenames in the database

fields($tableName)   X-Ref
Returns an array of the fields in given table name.

param: string $tableName Name of database table to inspect
return: array Fields in table. Keys are name and type

prepareValue($data)   X-Ref
Returns a quoted and escaped string of $data for use in an SQL statement.

param: string $data String to be prepared for use in an SQL statement
return: string Quoted and escaped

lastError()   X-Ref
Returns a formatted error message from previous database operation.

return: string Error message

lastAffected()   X-Ref
Returns number of affected rows in previous database operation. If no previous operation exists, this returns false.

return: int Number of affected rows

lastNumRows()   X-Ref
Returns number of rows in previous resultset. If no previous resultset exists,
this returns false.

return: int Number of rows in resultset

lastInsertId($table)   X-Ref
Returns the ID generated from the previous INSERT operation.

param: string $table Name of the database table
return: int

selectLimit($limit, $offset = '0')   X-Ref
Returns a limit statement in the correct format for the particular database.

param: int $limit Limit of results returned
param: int $offset Offset from which to start results
return: string SQL limit/offset statement



Généré le : Sun Feb 25 19:27:47 2007 par Balluche grâce à PHPXref 0.7