[ Index ] |
|
Code source de Joomla 1.0.13 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Copyright: | Copyright (C) 2005 Open Source Matters. All rights reserved. |
License: | http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php |
Version: | $Id: database.mysqli.php 973 2005-11-11 02:18:08Z eddieajau $ |
Poids: | 1392 lignes (37 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
database:: (34 méthodes):
database()
debug()
getErrorNum()
getErrorMsg()
getEscaped()
Quote()
NameQuote()
_quoteField()
getPrefix()
getNullDate()
setQuery()
replacePrefix()
getQuery()
query()
getAffectedRows()
query_batch()
explain()
getNumRows()
loadResult()
loadResultArray()
loadAssocList()
loadObject()
loadObjectList()
loadRow()
loadRowList()
insertObject()
updateObject()
stderr()
insertid()
getVersion()
getTableList()
getTableCreate()
getTableFields()
GenID()
mosDBTable:: (26 méthodes):
mosDBTable()
getPublicProperties()
_setSchema()
_getSchema()
_getFieldType()
filter()
getError()
get()
set()
reset()
bind()
load()
check()
store()
move()
updateOrder()
canDelete()
delete()
checkout()
checkin()
hit()
isCheckedOut()
save()
publish_array()
publish()
toXML()
database( $host='localhost', $user, $pass, $db='', $table_prefix='', $goOffline=true ) X-Ref |
Database object constructor param: string Database host param: string Database user name param: string Database user password param: string Database name param: string Common prefix for all tables param: boolean If true and there is an error, go offline |
debug( $level ) X-Ref |
param: int |
getErrorNum() X-Ref |
return: int The error number for the most recent query |
getErrorMsg() X-Ref |
return: string The error message for the most recent query |
getEscaped( $text ) X-Ref |
Get a database escaped string return: string |
Quote( $text ) X-Ref |
Get a quoted database escaped string return: string |
NameQuote( $s ) X-Ref |
Quote an identifier name (field, table, etc) param: string The name return: string The quoted name |
_quoteField( $value, $type ) X-Ref |
Quote based on field type param: mixed The value of the field param: string The field type return: string The correct field format |
getPrefix() X-Ref |
return: string The database prefix |
getNullDate() X-Ref |
return: string Quoted null/zero date string |
setQuery( $sql, $offset = 0, $limit = 0, $prefix=') X-Ref |
Sets the SQL query string for later execution. This function replaces a string identifier <var>$prefix</var> with the string held is the <var>_table_prefix</var> class variable. param: string The SQL query param: string The offset to start selection param: string The number of results to return param: string The common table prefix |
replacePrefix( $sql, $prefix=') X-Ref |
This function replaces a string identifier <var>$prefix</var> with the string held is the <var>_table_prefix</var> class variable. author: thede, David McKinnis param: string The SQL query param: string The common table prefix |
getQuery() X-Ref |
return: string The current value of the internal SQL vairable |
query() X-Ref |
Execute the query return: mixed A database resource if successful, FALSE if not. |
getAffectedRows() X-Ref |
return: int The number of affected rows in the previous operation |
query_batch( $abort_on_error=true, $p_transaction_safe = false) X-Ref |
Pas de description |
explain() X-Ref |
Diagnostic function |
getNumRows( $cur=null ) X-Ref |
return: int The number of rows returned from the most recent query. |
loadResult() X-Ref |
This method loads the first field of the first row returned by the query. return: The value returned in the query or null if the query failed. |
loadResultArray($numinarray = 0) X-Ref |
Load an array of single field results into an array |
loadAssocList( $key='' ) X-Ref |
Load a assoc list of database rows param: string The field name of a primary key return: array If <var>key</var> is empty as sequential list of returned records. |
loadObject( &$object ) X-Ref |
This global function loads the first row of a query into an object If an object is passed to this function, the returned row is bound to the existing elements of <var>object</var>. If <var>object</var> has a value of null, then all of the returned query fields returned in the object. param: string The SQL query param: object The address of variable |
loadObjectList( $key='' ) X-Ref |
Load a list of database objects param: string The field name of a primary key return: array If <var>key</var> is empty as sequential list of returned records. |
loadRow() X-Ref |
return: The first row of the query. |
loadRowList( $key='' ) X-Ref |
Load a list of database rows (numeric column indexing) param: string The field name of a primary key return: array If <var>key</var> is empty as sequential list of returned records. |
insertObject( $table, &$object, $keyName = NULL, $verbose=false ) X-Ref |
Document::db_insertObject() { Description } param: string $table This is expected to be a valid (and safe!) table name param: [type] $keyName param: [type] $verbose |
updateObject( $table, &$object, $keyName, $updateNulls=true ) X-Ref |
Document::db_updateObject() { Description } param: string $table This is expected to be a valid (and safe!) table name param: [type] $updateNulls |
stderr( $showSQL = false ) X-Ref |
param: boolean If TRUE, displays the last SQL statement sent to the database return: string A standised error message |
insertid() X-Ref |
Pas de description |
getVersion() X-Ref |
Pas de description |
getTableList() X-Ref |
return: array A list of all the tables in the database |
getTableCreate( $tables ) X-Ref |
param: array A list of valid (and safe!) table names return: array A list the create SQL for the tables |
getTableFields( $tables ) X-Ref |
param: array A list of valid (and safe!) table names return: array An array of fields by table |
GenID( $foo1=null, $foo2=null ) X-Ref |
Fudge method for ADOdb compatibility |
Classe: mosDBTable - X-Ref
mosDBTable Abstract Class.mosDBTable( $table, $key, &$db ) X-Ref |
Object constructor to set table and key field Can be overloaded/supplemented by the child class param: string $table name of the table in the db schema relating to child class param: string $key name of the primary key field in the table |
getPublicProperties() X-Ref |
Returns an array of public properties return: array |
_setSchema( $array=null ) X-Ref |
Sets the named schema array |
_getSchema() X-Ref |
Gets the schema array |
_getFieldType( $name ) X-Ref |
Returns the [database] type of the field param: string The name of the field return: string The field type |
filter( $ignoreList=null ) X-Ref |
Filters public properties param: array List of fields to ignore |
getError() X-Ref |
return: string Returns the error message |
get( $_property ) X-Ref |
Gets the value of the class variable param: string The name of the class variable return: mixed The value of the class var (or null if no var of that name exists) |
set( $_property, $_value ) X-Ref |
Set the value of the class variable param: string The name of the class variable param: mixed The value to assign to the variable |
reset( $value=null ) X-Ref |
Resets public properties param: mixed The value to set all properties to, default is null |
bind( $array, $ignore='' ) X-Ref |
binds a named array/hash to this object can be overloaded/supplemented by the child class param: array $hash named array return: null|string null is operation was satisfactory, otherwise returns an error |
load( $oid=null ) X-Ref |
binds an array/hash to this object param: int $oid optional argument, if not specifed then the value of current key is used return: any result from the database operation |
check() X-Ref |
generic check method can be overloaded/supplemented by the child class return: boolean True if the object is ok |
store( $updateNulls=false ) X-Ref |
Inserts a new row if id is zero or updates an existing row in the database table Can be overloaded/supplemented by the child class param: boolean If false, null object variables are not updated return: null|string null if successful otherwise returns and error message |
move( $dirn, $where='' ) X-Ref |
param: string $where This is expected to be a valid (and safe!) SQL expression |
updateOrder( $where='' ) X-Ref |
Compacts the ordering sequence of the selected records param: string Additional where query to limit ordering to a particular subset of records. This is expected to be a valid (and safe!) SQL expression |
canDelete( $oid=null, $joins=null ) X-Ref |
Generic check for whether dependancies exist for this object in the db schema can be overloaded/supplemented by the child class param: string $msg Error message returned param: int Optional key index param: array Optional array to compiles standard joins: format [label=>'Label',name=>'table name',idfield=>'field',joinfield=>'field']. This is expected to hold only valid (and safe!) SQL expressions return: true|false |
delete( $oid=null ) X-Ref |
Default delete method can be overloaded/supplemented by the child class return: true if successful otherwise returns and error message |
checkout( $user_id, $oid=null ) X-Ref |
Checks out an object param: int User id param: int Object id |
checkin( $oid=null ) X-Ref |
Checks in an object param: int Object id |
hit( $oid=null ) X-Ref |
Increments the hit counter for an object param: int Object id |
isCheckedOut( $user_id=0 ) X-Ref |
Tests if item is checked out param: int A user id return: boolean |
save( $source, $order_filter='' ) X-Ref |
Generic save function returns: TRUE if completely successful, FALSE if partially or not succesful param: array Source array for binding to class vars param: string Filter for the order updating. This is expected to be a valid (and safe!) SQL expression |
publish_array( $cid=null, $publish=1, $user_id=0 ) X-Ref |
publish( $cid=null, $publish=1, $user_id=0 ) X-Ref |
Generic Publish/Unpublish function param: array An array of id numbers param: integer 0 if unpublishing, 1 if publishing param: integer The id of the user performnig the operation |
toXML( $mapKeysToText=false ) X-Ref |
Export item list to xml param: boolean Map foreign keys to text values |
Généré le : Wed Nov 21 14:43:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |