[ 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_adodb.php (sommaire)

AdoDB 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: 421 lignes (11 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

DboAdodb:: (19 méthodes):
  connect()
  disconnect()
  _execute()
  fetchRow()
  begin()
  commit()
  rollback()
  listSources()
  describe()
  lastError()
  lastAffected()
  lastNumRows()
  lastInsertId()
  limit()
  column()
  value()
  fields()
  resultSet()
  fetchResult()


Classe: DboAdodb  - X-Ref

AdoDB DBO implementation.

Database abstraction implementation for the AdoDB library.

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

param: array $config Configuration array for connecting

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($sql = null)   X-Ref
Returns a row from current resultset as an array .

return: array The fetched row as an array

begin(&$model)   X-Ref
Begin a transaction

param: unknown_type $model
return: boolean True on success, false on fail

commit(&$model)   X-Ref
Commit a transaction

param: unknown_type $model
return: boolean True on success, false on fail

rollback(&$model)   X-Ref
Rollback a transaction

param: unknown_type $model
return: boolean True on success, false on fail

listSources()   X-Ref
Returns an array of tables in the database. If there are no tables, an error is raised and the application exits.

return: array Array of tablenames in the database

describe(&$model)   X-Ref
Returns an array of the fields in the table used by the given model.

param: AppModel $model Model object
return: array Fields in table. Keys are name and type

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, or false if no previous operation exists.

return: int Number of affected rows

lastNumRows()   X-Ref
Returns number of rows in previous resultset, or false if no previous resultset exists.

return: int Number of rows in resultset

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

returns: the last autonumbering ID inserted. Returns false if function not supported.
return: int

limit($limit, $offset = null)   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

column($real)   X-Ref
Converts database-layer column types to basic types

param: string $real Real database-layer column type (i.e. "varchar(255)")
return: string Abstract column type (i.e. "string")

value($data, $column = null, $safe = false)   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
param: string $column_type The type of the column into which this data will be inserted
param: boolean $safe Whether or not numeric data should be handled automagically if no column data is provided
return: string Quoted and escaped data

fields(&$model, $alias, $fields)   X-Ref
Generates the fields list of an SQL query.

param: Model $model
param: string $alias Alias tablename
param: mixed $fields
return: array

resultSet(&$results)   X-Ref
Enter description here...

param: unknown_type $results

fetchResult()   X-Ref
Fetches the next row from the current result set

return: unknown



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