| [ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
PHP SQL engine EXPERIMENTAL! $Id: class.t3lib_sqlengine.php 1421 2006-04-10 09:27:15Z mundaun $
| Author: | Kasper Skaarhoj <kasperYYYY@typo3.com> |
| Poids: | 904 lignes (23 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
t3lib_sqlengine:: (22 méthodes):
init()
resetStatusVars()
processAccordingToConfig()
exec_INSERTquery()
exec_UPDATEquery()
exec_DELETEquery()
exec_SELECTquery()
sql_query()
sql_error()
sql_insert_id()
sql_affected_rows()
quoteStr()
admin_get_tables()
admin_get_fields()
admin_get_keys()
admin_query()
readDataSource()
saveDataSource()
selectFromData()
select_evalSingle()
getResultSet()
debug_printResultSet()
t3lib_sqlengine_resultobj:: (5 méthodes):
sql_num_rows()
sql_fetch_assoc()
sql_fetch_row()
sql_data_seek()
sql_field_type()
Classe: t3lib_sqlengine - X-Ref
PHP SQL engine / server| init($config, &$pObj) X-Ref |
| Dummy function for initializing SQL handler. Create you own in derived classes. param: array Configuration array from handler param: object Parent object return: void |
| resetStatusVars() X-Ref |
| Reset SQL engine status variables (insert id, affected rows, error status) return: void |
| processAccordingToConfig(&$value,$fInfo) X-Ref |
| Processing of update/insert values based on field type. The input value is typecast and trimmed/shortened according to the field type and the configuration options from the $fInfo parameter. param: mixed $value The input value to process param: array $fInfo Field configuration data return: mixed The processed input value |
| exec_INSERTquery($table,$fields_values) X-Ref |
| Execute an INSERT query param: string Table name param: array Field values as key=>value pairs. return: boolean TRUE on success and FALSE on failure (error is set internally) |
| exec_UPDATEquery($table,$where,$fields_values) X-Ref |
| Execute UPDATE query on table param: string Table name param: string WHERE clause param: array Field values as key=>value pairs. return: boolean TRUE on success and FALSE on failure (error is set internally) |
| exec_DELETEquery($table,$where) X-Ref |
| Execute DELETE query param: string Table to delete from param: string WHERE clause return: boolean TRUE on success and FALSE on failure (error is set internally) |
| exec_SELECTquery($select_fields,$from_table,$where_clause,$groupBy,$orderBy,$limit) X-Ref |
| Execute SELECT query param: string List of fields to select from the table. This is what comes right after "SELECT ...". Required value. param: string Table(s) from which to select. This is what comes right after "FROM ...". Required value. param: string Optional additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->fullQuoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT! param: string Optional GROUP BY field(s), if none, supply blank string. param: string Optional ORDER BY field(s), if none, supply blank string. param: string Optional LIMIT value ([begin,]max), if none, supply blank string. return: object Returns result object, but if errors, returns false |
| sql_query($query) X-Ref |
| Performs an SQL query on the "database" param: string Query to execute return: object Result object or false if error |
| sql_error() X-Ref |
| Returns most recent error return: string Error message, if any |
| sql_insert_id() X-Ref |
| Returns most recently create unique ID (of INSERT queries) return: integer Last unique id created. |
| sql_affected_rows() X-Ref |
| Returns affected rows (of UPDATE and DELETE queries) return: integer Last amount of affected rows. |
| quoteStr($str) X-Ref |
| Quoting strings for insertion in SQL queries param: string Input String return: string String, with quotes escaped |
| admin_get_tables() X-Ref |
| (DUMMY) Returns the list of tables from the database return: array Tables in an array (tablename is in both key and value) |
| admin_get_fields($tableName) X-Ref |
| (DUMMY) Returns information about each field in the $table param: string Table name return: array Field information in an associative array with fieldname => field row |
| admin_get_keys($tableName) X-Ref |
| (DUMMY) Returns information about each index key in the $table param: string Table name return: array Key information in a numeric array |
| admin_query($query) X-Ref |
| (DUMMY) mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database! param: string Query to execute return: pointer Result pointer |
| readDataSource($table) X-Ref |
| Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably! param: string Table name return: void |
| saveDataSource($table) X-Ref |
| Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably! param: string Table name return: void |
| selectFromData($table,$where) X-Ref |
| PHP simulation of SQL "SELECT" Yet EXPERIMENTAL! param: string Table name param: array Where clause parsed into array return: array Array of keys pointing to result rows in $this->data[$table] |
| select_evalSingle($table,$config,&$itemKeys) X-Ref |
| Evalutaion of a WHERE-clause-array. Yet EXPERIMENTAL param: string Tablename param: array WHERE-configuration array param: array Data array to work on. return: void Data array passed by reference |
| getResultSet($keys, $table, $fieldList) X-Ref |
| Returning result set based on result keys, table and field list param: array Result keys param: string Tablename param: string Fieldlist (commaseparated) return: array Result array with "rows" |
| debug_printResultSet($array) X-Ref |
| Returns the result set (in array) as HTML table. For debugging. param: array Result set array (array of rows) return: string HTML table |
Classe: t3lib_sqlengine_resultobj - X-Ref
PHP SQL engine, result object| sql_num_rows() X-Ref |
| Counting number of rows return: integer |
| sql_fetch_assoc() X-Ref |
| Fetching next row in result array return: array Associative array |
| sql_fetch_row() X-Ref |
| Fetching next row, numerical indices return: array Numerical array |
| sql_data_seek($pointer) X-Ref |
| Seeking position in result param: integer Position pointer. return: boolean Returns true on success |
| sql_field_type() X-Ref |
| Returning SQL field type return: string Blank string, not supported (it seems) |
| Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
|