Jeff PHP framework
0.99
Modular, extensible, OOP, MVC, lightweight php framework designed to ease the programmers in the development of web applications.
|
Database client interface. More...
Public Member Functions | |
__construct ($params) | |
autoSelect ($fields, $tables, $where, $order=null, $limit=null) | |
Executes a select statement on the active database, and returns the result. | |
delete ($table, $where) | |
Deletes records from the given table using the given where clause. | |
escapeString ($string) | |
Escapes the input string for safe database insertion. | |
executeQuery ($query) | |
Executes a query on the active database. | |
getError () | |
Returns the error from the last executed function in a custom format. | |
getFieldsName ($table) | |
Returns the name of the fields of the given table. | |
getNumRecords ($table, $where=null, $field='id') | |
Returns the number of records in the given table selectyed by the given where clause. | |
getTables ($like=null) | |
Returns the names of the tables found in the connected database. | |
getTableStructure ($table) | |
Returns information about the structure of a table. | |
insert ($table, $data) | |
Inserts the given data in the given table. | |
openConnection () | |
Opens the connection with the DB HOST, exits on error. | |
queryResult ($query) | |
Returns the query result with accessible data. | |
update ($table, $data, $where) | |
Updates the given table with the given data using the given where clause. |
Database client interface.
Defines a common interface for all db client classes.
Definition at line 25 of file interface.db.php.
DbManager::__construct | ( | $ | params | ) |
Implemented in mysql.
DbManager::autoSelect | ( | $ | fields, |
$ | tables, | ||
$ | where, | ||
$ | order = null , |
||
$ | limit = null |
||
) |
Executes a select statement on the active database, and returns the result.
mixed | $fields | the fields to be selected. Possible values: array of fields or string. |
mixed | $tables | the table/s from which retrieve records. Possible values: array of tables, string. |
string | $where | the where clause |
string | $order | the order by clause |
array | $limit | the limit clause |
Implemented in mysql.
DbManager::delete | ( | $ | table, |
$ | where | ||
) |
Deletes records from the given table using the given where clause.
string | $table | the database table |
mixed | $where | the where clause |
Implemented in mysql.
DbManager::escapeString | ( | $ | string | ) |
Escapes the input string for safe database insertion.
string | $string |
Implemented in mysql.
DbManager::executeQuery | ( | $ | query | ) |
Executes a query on the active database.
string | $query | the query to execute |
Implemented in mysql.
Returns the error from the last executed function in a custom format.
Implemented in mysql.
DbManager::getFieldsName | ( | $ | table | ) |
Returns the name of the fields of the given table.
string | $table | the database table |
Implemented in mysql.
DbManager::getNumRecords | ( | $ | table, |
$ | where = null , |
||
$ | field = 'id' |
||
) |
Returns the number of records in the given table selectyed by the given where clause.
string | $table | the database table |
mixed | $where | the where clause |
string | $field | the field used for counting |
Implemented in mysql.
DbManager::getTables | ( | $ | like = null | ) |
Returns the names of the tables found in the connected database.
string | $like | the like clause, defaut null. |
Implemented in mysql.
DbManager::getTableStructure | ( | $ | table | ) |
Returns information about the structure of a table.
string | $table | the database table |
Implemented in mysql.
DbManager::insert | ( | $ | table, |
$ | data | ||
) |
Inserts the given data in the given table.
string | $table | the database table |
array | $data | the data to insert in the form array('field_name'=>'value') |
Implemented in mysql.
DbManager::queryResult | ( | $ | query | ) |
Returns the query result with accessible data.
string | $query | the query to execute |
Implemented in mysql.
DbManager::update | ( | $ | table, |
$ | data, | ||
$ | where | ||
) |
Updates the given table with the given data using the given where clause.
string | $table | |
array | $data | the data to update in the form array('field_name'=>'value') |
string | $where | the where clause |
Implemented in mysql.