Public Member Functions | |
| getTables ($unPrefix=true) | |
| prefixTable ($table) | |
| fields ($table) | |
| closeConnection () | |
| prepare ($sql, array $options=array()) | |
| prepare ($sql) | |
| lastInsertId () | |
| getInstanceCfg () | |
| getConnection () | |
| query ($sql, array $bind=array()) | |
| beginTransaction () | |
| commit () | |
| rollBack () | |
| insert (array $prm) | |
| replace (array $prm) | |
| update (array $prm) | |
| delete (array $prm) | |
| makeWhere ($where, $whereOp='AND', $incWhere=true) | |
| getFetchMode () | |
| setFetchMode ($mode) | |
| selectQuery (array $prm) | |
| select ($prm) | |
| count (array $prm) | |
| fetchAssoc (array $prm) | |
| fetchPairs (array $prm) | |
| fetchRow (array $prm) | |
| quoteIdentifier ($ident) | |
| quoteValue ($value) | |
| optimize ($table) | |
| getTablesWith (array $prm) | |
| getI18nTable ($table) | |
| getWhere (array $prm=array()) | |
| getCache () | |
| __sleep () | |
| getAttr ($name) | |
| setAttr ($name, $value) | |
| getCfg () | |
Protected Member Functions | |
| _connect () | |
| _dsn () | |
| _beginTransaction () | |
| _commit () | |
| _rollBack () | |
| tableAlias ($query, array $tblAlias) | |
| beforeInit () | |
| afterInit () | |
Protected Attributes | |
| $tables | |
| $connection | |
| $cfg | |
Interface for db classes
Definition at line 10 of file mysql.class.php.
| __sleep | ( | ) | [inherited] |
Magic function to allow serialisation
Definition at line 613 of file db/abstract.class.php.
| _beginTransaction | ( | ) | [protected, inherited] |
Begin a transaction.
Reimplemented from db_abstract.
Definition at line 81 of file db/pdo/abstract.class.php.
| _commit | ( | ) | [protected, inherited] |
Commit a transaction.
Reimplemented from db_abstract.
Definition at line 89 of file db/pdo/abstract.class.php.
| _connect | ( | ) | [protected, inherited] |
Creates a connection to the database.
Reimplemented from db_abstract.
Definition at line 22 of file db/pdo/abstract.class.php.
| _dsn | ( | ) | [protected, inherited] |
Create The dsn string for the connection.
Definition at line 43 of file db/pdo/abstract.class.php.
| _rollBack | ( | ) | [protected, inherited] |
Roll-back a transaction.
Reimplemented from db_abstract.
Definition at line 97 of file db/pdo/abstract.class.php.
| afterInit | ( | ) | [protected, inherited] |
Call just after the configuration initialisation
Reimplemented in db_row, db_rowset, db_table, db_where, form_abstract, form_captcha, form_checkbox_fields, form_date, form_file, form_fileUploaded, form_list, form_mulValue, form_range_date, form, helper_dataTable, helper_email, helper_filterTable, http_cookie, module_abstract, module_out_controller, module_scaffold_controller, response_http_html, response_http_xul, response_http, response_proxy, security_abstract, security_default, session_php, and tpl.
Definition at line 40 of file object.class.php.
| beforeInit | ( | ) | [protected, inherited] |
Call just before the configuration initialisation
Reimplemented in form_file.
Definition at line 35 of file object.class.php.
| beginTransaction | ( | ) | [inherited] |
Leave autocommit mode and begin a transaction.
Definition at line 58 of file db/abstract.class.php.
| closeConnection | ( | ) | [inherited] |
Force the connection to close.
Reimplemented from db_abstract.
Definition at line 52 of file db/pdo/abstract.class.php.
| commit | ( | ) | [inherited] |
Commit a transaction and return to autocommit mode.
Definition at line 69 of file db/abstract.class.php.
| count | ( | array $ | prm | ) | [inherited] |
Count the number of result
| array | $prm Same option than selectQuery |
Definition at line 446 of file db/abstract.class.php.
| delete | ( | array $ | prm | ) | [inherited] |
Deletes table rows based on a WHERE clause.
| array | $prm The parameter for the replace query :
|
Definition at line 180 of file db/abstract.class.php.
| fetchAssoc | ( | array $ | prm | ) | [inherited] |
Fetches all SQL result rows as an associative array. Same parameter as select.
The first column is the key, the entire row array is the value. You should construct the query to be sure that the first column contains unique values, or else rows with duplicate values in the first column will overwrite previous data.
| array | $prm: same as select |
Definition at line 471 of file db/abstract.class.php.
| fetchPairs | ( | array $ | prm | ) | [inherited] |
Fetches all SQL result rows as an array of key-value pairs.
The first column is the key, the second column is the value.
| array | $prm: same as select. |
Definition at line 486 of file db/abstract.class.php.
| fetchRow | ( | array $ | prm | ) | [inherited] |
Fetches the first row of the SQL result. Uses the current fetchMode for the adapter.
| array | $prm: same as select. |
Definition at line 499 of file db/abstract.class.php.
| fields | ( | $ | table | ) |
Returns the properties
| string | $table TableName |
Reimplemented from db_abstract.
Definition at line 64 of file mysql.class.php.
| getAttr | ( | $ | name | ) | [inherited] |
Get an attribute
| string | $name Attribute name |
Reimplemented in response_proxy.
Definition at line 48 of file object.class.php.
| getCache | ( | ) | [inherited] |
| getCfg | ( | ) | [inherited] |
| getConnection | ( | ) | [inherited] |
Returns the connection object, ressource. Initialize the connection if need.
Definition at line 34 of file db/abstract.class.php.
| getFetchMode | ( | ) | [inherited] |
| getI18nTable | ( | $ | table | ) | [inherited] |
Get the i18n tablename
| string | $table table name |
Definition at line 578 of file db/abstract.class.php.
| getInstanceCfg | ( | ) | [inherited] |
Get the configuration parameter used to create this object
Definition at line 24 of file db/abstract.class.php.
| getTables | ( | $ | unPrefix = true |
) |
Returns a list of the tables in the database.
| boolean | $unPrefix Indicate if the table name shold remove paramettred prefix |
Reimplemented from db_abstract.
Definition at line 25 of file mysql.class.php.
| getTablesWith | ( | array $ | prm | ) | [inherited] |
Returns a list of the tables with the parameters provided
| array | $prm The parameters for the search:
|
Definition at line 554 of file db/abstract.class.php.
| getWhere | ( | array $ | prm = array() |
) | [inherited] |
Get a where object
| array | $prm The configuration for the where object |
Definition at line 593 of file db/abstract.class.php.
| insert | ( | array $ | prm | ) | [inherited] |
Insert on the database
| array | $prm The parameter for the insert query :
|
Definition at line 94 of file db/abstract.class.php.
| lastInsertId | ( | ) | [inherited] |
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
Reimplemented from db_abstract.
Definition at line 73 of file db/pdo/abstract.class.php.
| makeWhere | ( | $ | where, | |
| $ | whereOp = 'AND', |
|||
| $ | incWhere = true | |||
| ) | [inherited] |
Make a where clause from a where parameter (select, update or delete)
| string|array | $where | |
| string | $whereOp Operator (AND or OR) | |
| bool | $incWhere Indicates if the WHERE keywords should be included at the beginning |
Definition at line 210 of file db/abstract.class.php.
| optimize | ( | $ | table | ) | [inherited] |
Optimize a table
| string | $table The table name |
Definition at line 541 of file db/abstract.class.php.
| prefixTable | ( | $ | table | ) |
Add a prefix that was previsouly removed for a table name
| string | $table Table name |
Reimplemented from db_abstract.
Definition at line 48 of file mysql.class.php.
| prepare | ( | $ | sql | ) | [abstract, inherited] |
Prepare a statement and return a PDOStatement.
| string|Zend_Db_Select | $sql SQL query |
| prepare | ( | $ | sql, | |
| array $ | options = array() | |||
| ) | [inherited] |
Prepare a statement and return a PDOStatement-like object.
| string | $sql SQL query | |
| array | $options Driver option |
Definition at line 63 of file db/pdo/abstract.class.php.
| query | ( | $ | sql, | |
| array $ | bind = array() | |||
| ) | [inherited] |
Prepare and execute a query, with binding if provided
| string | $sql The query to execute |
Definition at line 45 of file db/abstract.class.php.
| quoteIdentifier | ( | $ | ident | ) | [inherited] |
Quotes an identifier.
| string | $ident The identifier. |
Definition at line 511 of file db/abstract.class.php.
| quoteValue | ( | $ | value | ) | [inherited] |
Quotes a value.
| string | $value The value. |
Definition at line 532 of file db/abstract.class.php.
| replace | ( | array $ | prm | ) | [inherited] |
Replace on the database
| array | $prm The parameter for the replace query :
|
Definition at line 120 of file db/abstract.class.php.
| rollBack | ( | ) | [inherited] |
Roll back a transaction and return to autocommit mode.
Definition at line 80 of file db/abstract.class.php.
| select | ( | $ | prm | ) | [inherited] |
Create a Select Query
| array|string | $prm Query as string or array: The parameter for the select query ( |
Definition at line 406 of file db/abstract.class.php.
| selectQuery | ( | array $ | prm | ) | [inherited] |
Create a Select Query
| array | $prm The parameter for the select query :
|
| nException | if no table provided |
Definition at line 273 of file db/abstract.class.php.
| setAttr | ( | $ | name, | |
| $ | value | |||
| ) | [inherited] |
Set an attribute
| string | $name Attribute name | |
| mixed | $value Attribute value |
Reimplemented in response_proxy.
Definition at line 58 of file object.class.php.
| setFetchMode | ( | $ | mode | ) | [inherited] |
| tableAlias | ( | $ | query, | |
| array $ | tblAlias | |||
| ) | [protected, inherited] |
Apply the table alias to a query
| string | $query The query | |
| array | $tblAlias The alias (keys: tablenames, values: aliases) |
Definition at line 381 of file db/abstract.class.php.
| update | ( | array $ | prm | ) | [inherited] |
Update on the database
| array | $prm The parameter for the replace query :
|
| nException |
Definition at line 149 of file db/abstract.class.php.
$cfg [protected, inherited] |
Definition at line 17 of file object.class.php.
$connection [protected, inherited] |
Reimplemented from db_abstract.
Definition at line 17 of file db/pdo/abstract.class.php.
$tables [protected] |
Definition at line 17 of file mysql.class.php.
1.7.1