Documentation TYPO3 par Ameos |
Public Member Functions | |
exec_INSERTquery ($table, $fields_values) | |
exec_UPDATEquery ($table, $where, $fields_values) | |
exec_DELETEquery ($table, $where) | |
exec_SELECTquery ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='') | |
exec_SELECT_mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause='', $groupBy='', $orderBy='', $limit='') | |
exec_SELECT_queryArray ($queryParts) | |
exec_SELECTgetRows ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='', $uidIndexField='') | |
INSERTquery ($table, $fields_values) | |
UPDATEquery ($table, $where, $fields_values) | |
DELETEquery ($table, $where) | |
SELECTquery ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='') | |
listQuery ($field, $value, $table) | |
searchQuery ($searchWords, $fields, $table) | |
quoteStr ($str, $table) | |
cleanIntArray ($arr) | |
cleanIntList ($list) | |
stripOrderBy ($str) | |
stripGroupBy ($str) | |
splitGroupOrderLimit ($str) | |
sql ($db, $query) | |
sql_query ($query) | |
sql_error () | |
sql_num_rows ($res) | |
sql_fetch_assoc ($res) | |
sql_fetch_row ($res) | |
sql_free_result ($res) | |
sql_insert_id () | |
sql_affected_rows () | |
sql_data_seek ($res, $seek) | |
sql_field_type ($res, $pointer) | |
sql_pconnect ($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password) | |
sql_select_db ($TYPO3_db) | |
admin_get_dbs () | |
admin_get_tables () | |
admin_get_fields ($tableName) | |
admin_get_keys ($tableName) | |
admin_query ($query) | |
debug ($func) | |
exec_INSERTquery ($table, $fields_values) | |
exec_UPDATEquery ($table, $where, $fields_values) | |
exec_DELETEquery ($table, $where) | |
exec_SELECTquery ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='') | |
exec_SELECT_mm_query ($select, $local_table, $mm_table, $foreign_table, $whereClause='', $groupBy='', $orderBy='', $limit='') | |
exec_SELECT_queryArray ($queryParts) | |
exec_SELECTgetRows ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='', $uidIndexField='') | |
INSERTquery ($table, $fields_values) | |
UPDATEquery ($table, $where, $fields_values) | |
DELETEquery ($table, $where) | |
SELECTquery ($select_fields, $from_table, $where_clause, $groupBy='', $orderBy='', $limit='') | |
listQuery ($field, $value, $table) | |
searchQuery ($searchWords, $fields, $table) | |
quoteStr ($str, $table) | |
cleanIntArray ($arr) | |
cleanIntList ($list) | |
stripOrderBy ($str) | |
stripGroupBy ($str) | |
splitGroupOrderLimit ($str) | |
sql ($db, $query) | |
sql_query ($query) | |
sql_error () | |
sql_num_rows ($res) | |
sql_fetch_assoc ($res) | |
sql_fetch_row ($res) | |
sql_free_result ($res) | |
sql_insert_id () | |
sql_affected_rows () | |
sql_data_seek ($res, $seek) | |
sql_field_type ($res, $pointer) | |
sql_pconnect ($TYPO3_db_host, $TYPO3_db_username, $TYPO3_db_password) | |
sql_select_db ($TYPO3_db) | |
admin_get_dbs () | |
admin_get_tables () | |
admin_get_fields ($tableName) | |
admin_get_keys ($tableName) | |
admin_query ($query) | |
debug ($func) | |
Public Attributes | |
$debugOutput = FALSE | |
$debug_lastBuiltQuery = '' | |
$link |
Definition at line 132 of file class.t3lib_db.php.
|
Listing databases from current MySQL connection. NOTICE: It WILL try to select those databases and thus break selection of current database. This doesn't really make sense to transfer to a DBAL layer - this detection is also PRE-DBAL in many ways since it is only used as a service function in the 1-2-3 process of the Install Tool. In any case a lookup should be done in the _DEFAULT handler DBMS then. Use in Install Tool only! Usage count/core: 1
Definition at line 854 of file class.t3lib_db.php. References sql_select_db(). |
|
Listing databases from current MySQL connection. NOTICE: It WILL try to select those databases and thus break selection of current database. This doesn't really make sense to transfer to a DBAL layer - this detection is also PRE-DBAL in many ways since it is only used as a service function in the 1-2-3 process of the Install Tool. In any case a lookup should be done in the _DEFAULT handler DBMS then. Use in Install Tool only! Usage count/core: 1
Definition at line 854 of file class.t3lib_db.php. References sql_select_db(). |
|
Returns information about each field in the $table (quering the DBMS) In a DBAL this should look up the right handler for the table and return compatible information This function is important not only for the Install Tool but probably for DBALs as well since they might need to look up table specific information in order to construct correct queries. In such cases this information should probably be cached for quick delivery
Definition at line 891 of file class.t3lib_db.php. |
|
Returns information about each field in the $table (quering the DBMS) In a DBAL this should look up the right handler for the table and return compatible information This function is important not only for the Install Tool but probably for DBALs as well since they might need to look up table specific information in order to construct correct queries. In such cases this information should probably be cached for quick delivery
Definition at line 891 of file class.t3lib_db.php. |
|
Returns information about each index key in the $table (quering the DBMS) In a DBAL this should look up the right handler for the table and return compatible information
Definition at line 909 of file class.t3lib_db.php. |
|
Returns information about each index key in the $table (quering the DBMS) In a DBAL this should look up the right handler for the table and return compatible information
Definition at line 909 of file class.t3lib_db.php. |
|
Returns the list of tables from the default database, TYPO3_db (quering the DBMS) In a DBAL this method should 1) look up all tables from the DBMS of the _DEFAULT handler and then 2) add all tables *configured* to be managed by other handlers Usage count/core: 2
Definition at line 872 of file class.t3lib_db.php. |
|
Returns the list of tables from the default database, TYPO3_db (quering the DBMS) In a DBAL this method should 1) look up all tables from the DBMS of the _DEFAULT handler and then 2) add all tables *configured* to be managed by other handlers Usage count/core: 2
Definition at line 872 of file class.t3lib_db.php. |
|
mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database! Usage count/core: 10
Definition at line 927 of file class.t3lib_db.php. References admin_query(), and debug(). |
|
mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database! Usage count/core: 10
Definition at line 927 of file class.t3lib_db.php. References debug(). Referenced by admin_query(). |
|
Will convert all values in the one-dimentional array to integers. Useful when you want to make sure an array contains only integers before imploding them in a select-list. Usage count/core: 7
Definition at line 550 of file class.t3lib_db.php. |
|
Will convert all values in the one-dimentional array to integers. Useful when you want to make sure an array contains only integers before imploding them in a select-list. Usage count/core: 7
Definition at line 550 of file class.t3lib_db.php. |
|
Will force all entries in the input comma list to integers Useful when you want to make sure a commalist of supposed integers really contain only integers; You want to know that when you don't trust content that could go into an SQL statement. Usage count/core: 6
Definition at line 566 of file class.t3lib_db.php. References t3lib_div::intExplode(). |
|
Will force all entries in the input comma list to integers Useful when you want to make sure a commalist of supposed integers really contain only integers; You want to know that when you don't trust content that could go into an SQL statement. Usage count/core: 6
Definition at line 566 of file class.t3lib_db.php. References t3lib_div::intExplode(). |
|
Debug function: Outputs error if any
Definition at line 954 of file class.t3lib_db.php. References sql_error(), and t3lib_div::view_array(). |
|
Debug function: Outputs error if any
Definition at line 954 of file class.t3lib_db.php. References sql_error(), and t3lib_div::view_array(). Referenced by admin_query(), exec_DELETEquery(), exec_INSERTquery(), exec_SELECTgetRows(), exec_SELECTquery(), exec_UPDATEquery(), sql(), and sql_query(). |
|
Creates a DELETE SQL-statement for $table where $where-clause Usage count/core: 3
Definition at line 407 of file class.t3lib_db.php. References DELETEquery(). |
|
Creates a DELETE SQL-statement for $table where $where-clause Usage count/core: 3
Definition at line 407 of file class.t3lib_db.php. Referenced by DELETEquery(), and exec_DELETEquery(). |
|
Creates and executes a DELETE SQL-statement for $table where $where-clause Usage count/core: 40
Definition at line 197 of file class.t3lib_db.php. References debug(), DELETEquery(), and exec_DELETEquery(). |
|
Creates and executes a DELETE SQL-statement for $table where $where-clause Usage count/core: 40
Definition at line 197 of file class.t3lib_db.php. References debug(), and DELETEquery(). Referenced by exec_DELETEquery(). |
|
Creates and executes an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Using this function specifically allows us to handle BLOB and CLOB fields depending on DB Usage count/core: 47
Definition at line 167 of file class.t3lib_db.php. References debug(), exec_INSERTquery(), and INSERTquery(). |
|
Creates and executes an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Using this function specifically allows us to handle BLOB and CLOB fields depending on DB Usage count/core: 47
Definition at line 167 of file class.t3lib_db.php. References debug(), and INSERTquery(). Referenced by exec_INSERTquery(). |
|
Creates and executes a SELECT query, selecting fields ($select) from two/three tables joined Use $mm_table together with $local_table or $foreign_table to select over two tables. Or use all three tables to select the full MM-relation. The JOIN is done with [$local_table].uid <--> [$mm_table].uid_local / [$mm_table].uid_foreign <--> [$foreign_table].uid The function is very useful for selecting MM-relations between tables adhering to the MM-format used by TCE (TYPO3 Core Engine). See the section on $TCA in Inside TYPO3 for more details. Usage: 12 (spec. ext. sys_action, sys_messages, sys_todos)
Definition at line 241 of file class.t3lib_db.php. |
|
Creates and executes a SELECT query, selecting fields ($select) from two/three tables joined Use $mm_table together with $local_table or $foreign_table to select over two tables. Or use all three tables to select the full MM-relation. The JOIN is done with [$local_table].uid <--> [$mm_table].uid_local / [$mm_table].uid_foreign <--> [$foreign_table].uid The function is very useful for selecting MM-relations between tables adhering to the MM-format used by TCE (TYPO3 Core Engine). See the section on $TCA in Inside TYPO3 for more details. Usage: 12 (spec. ext. sys_action, sys_messages, sys_todos)
Definition at line 241 of file class.t3lib_db.php. |
|
Executes a select based on input query parts array Usage: 9
Definition at line 264 of file class.t3lib_db.php. References exec_SELECTquery(). |
|
Executes a select based on input query parts array Usage: 9
Definition at line 264 of file class.t3lib_db.php. References exec_SELECTquery(). |
|
Creates and executes a SELECT SQL-statement AND traverse result set and returns array with records in.
Definition at line 287 of file class.t3lib_db.php. References debug(), exec_SELECTquery(), SELECTquery(), sql_error(), and sql_fetch_assoc(). |
|
Creates and executes a SELECT SQL-statement AND traverse result set and returns array with records in.
Definition at line 287 of file class.t3lib_db.php. References debug(), exec_SELECTquery(), SELECTquery(), sql_error(), and sql_fetch_assoc(). |
|
Creates and executes a SELECT SQL-statement Using this function specifically allow us to handle the LIMIT feature independently of DB. Usage count/core: 340
Definition at line 216 of file class.t3lib_db.php. References debug(), exec_SELECTquery(), and SELECTquery(). |
|
Creates and executes a SELECT SQL-statement Using this function specifically allow us to handle the LIMIT feature independently of DB. Usage count/core: 340
Definition at line 216 of file class.t3lib_db.php. References debug(), and SELECTquery(). Referenced by exec_SELECT_queryArray(), exec_SELECTgetRows(), and exec_SELECTquery(). |
|
Creates and executes an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. Using this function specifically allow us to handle BLOB and CLOB fields depending on DB Usage count/core: 50
Definition at line 183 of file class.t3lib_db.php. References debug(), exec_UPDATEquery(), and UPDATEquery(). |
|
Creates and executes an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. Using this function specifically allow us to handle BLOB and CLOB fields depending on DB Usage count/core: 50
Definition at line 183 of file class.t3lib_db.php. References debug(), and UPDATEquery(). Referenced by exec_UPDATEquery(). |
|
Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Usage count/core: 4
Definition at line 332 of file class.t3lib_db.php. References quoteStr(). |
|
Creates an INSERT SQL-statement for $table from the array with field/value pairs $fields_values. Usage count/core: 4
Definition at line 332 of file class.t3lib_db.php. References quoteStr(). Referenced by exec_INSERTquery(). |
|
Returns a WHERE clause that can find a value ($value) in a list field ($field) For instance a record in the database might contain a list of numbers, "34,234,5" (with no spaces between). This query would be able to select that record based on the value "34", "234" or "5" regardless of their positioni in the list (left, middle or right). Is nice to look up list-relations to records or files in TYPO3 database tables.
Definition at line 477 of file class.t3lib_db.php. References quoteStr(). |
|
Returns a WHERE clause that can find a value ($value) in a list field ($field) For instance a record in the database might contain a list of numbers, "34,234,5" (with no spaces between). This query would be able to select that record based on the value "34", "234" or "5" regardless of their positioni in the list (left, middle or right). Is nice to look up list-relations to records or files in TYPO3 database tables.
Definition at line 477 of file class.t3lib_db.php. References quoteStr(). |
|
Substitution for PHP function "addslashes()" Use this function instead of the PHP addslashes() function when you build queries - this will prepare your code for DBAL. Usage count/core: 105
Definition at line 537 of file class.t3lib_db.php. |
|
Substitution for PHP function "addslashes()" Use this function instead of the PHP addslashes() function when you build queries - this will prepare your code for DBAL. Usage count/core: 105
Definition at line 537 of file class.t3lib_db.php. Referenced by INSERTquery(), and listQuery(). |
|
Returns a WHERE clause which will make an AND search for the words in the $searchWords array in any of the fields in array $fields.
Definition at line 491 of file class.t3lib_db.php. |
|
Returns a WHERE clause which will make an AND search for the words in the $searchWords array in any of the fields in array $fields.
Definition at line 491 of file class.t3lib_db.php. |
|
Creates a SELECT SQL-statement Usage count/core: 11
Definition at line 436 of file class.t3lib_db.php. |
|
Creates a SELECT SQL-statement Usage count/core: 11
Definition at line 436 of file class.t3lib_db.php. Referenced by exec_SELECTgetRows(), and exec_SELECTquery(). |
|
Takes the last part of a query, eg. "... uid=123 GROUP BY title ORDER BY title LIMIT 5,2" and splits each part into a table (WHERE, GROUPBY, ORDERBY, LIMIT) Work-around function for use where you know some userdefined end to an SQL clause is supplied and you need to separate these factors. Usage count/core: 13
Definition at line 606 of file class.t3lib_db.php. |
|
Takes the last part of a query, eg. "... uid=123 GROUP BY title ORDER BY title LIMIT 5,2" and splits each part into a table (WHERE, GROUPBY, ORDERBY, LIMIT) Work-around function for use where you know some userdefined end to an SQL clause is supplied and you need to separate these factors. Usage count/core: 13
Definition at line 606 of file class.t3lib_db.php. |
|
Executes query mysql() wrapper function DEPRECIATED - use exec_* functions from this class instead! Usage count/core: 9
Definition at line 671 of file class.t3lib_db.php. |
|
Executes query mysql() wrapper function DEPRECIATED - use exec_* functions from this class instead! Usage count/core: 9
Definition at line 671 of file class.t3lib_db.php. References debug(). Referenced by sql(). |
|
Returns the number of rows affected by the last INSERT, UPDATE or DELETE query mysql_affected_rows() wrapper function Usage count/core: 1
Definition at line 769 of file class.t3lib_db.php. |
|
Returns the number of rows affected by the last INSERT, UPDATE or DELETE query mysql_affected_rows() wrapper function Usage count/core: 1
Definition at line 769 of file class.t3lib_db.php. |
|
Move internal result pointer mysql_data_seek() wrapper function Usage count/core: 3
Definition at line 782 of file class.t3lib_db.php. |
|
Move internal result pointer mysql_data_seek() wrapper function Usage count/core: 3
Definition at line 782 of file class.t3lib_db.php. |
|
Returns the error status on the last sql() execution mysql_error() wrapper function Usage count/core: 32
Definition at line 698 of file class.t3lib_db.php. |
|
Returns the error status on the last sql() execution mysql_error() wrapper function Usage count/core: 32
Definition at line 698 of file class.t3lib_db.php. Referenced by debug(), and exec_SELECTgetRows(). |
|
Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. mysql_fetch_assoc() wrapper function Usage count/core: 307
Definition at line 722 of file class.t3lib_db.php. |
|
Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows. mysql_fetch_assoc() wrapper function Usage count/core: 307
Definition at line 722 of file class.t3lib_db.php. Referenced by exec_SELECTgetRows(). |
|
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. The array contains the values in numerical indices. mysql_fetch_row() wrapper function Usage count/core: 56
Definition at line 735 of file class.t3lib_db.php. |
|
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. The array contains the values in numerical indices. mysql_fetch_row() wrapper function Usage count/core: 56
Definition at line 735 of file class.t3lib_db.php. |
|
Get the type of the specified field in a result mysql_field_type() wrapper function Usage count/core: 2
Definition at line 795 of file class.t3lib_db.php. |
|
Get the type of the specified field in a result mysql_field_type() wrapper function Usage count/core: 2
Definition at line 795 of file class.t3lib_db.php. |
|
Free result memory mysql_free_result() wrapper function Usage count/core: 3
Definition at line 747 of file class.t3lib_db.php. |
|
Free result memory mysql_free_result() wrapper function Usage count/core: 3
Definition at line 747 of file class.t3lib_db.php. |
|
Get the ID generated from the previous INSERT operation mysql_insert_id() wrapper function Usage count/core: 13
Definition at line 758 of file class.t3lib_db.php. |
|
Get the ID generated from the previous INSERT operation mysql_insert_id() wrapper function Usage count/core: 13
Definition at line 758 of file class.t3lib_db.php. |
|
Returns the number of selected rows. mysql_num_rows() wrapper function Usage count/core: 85
Definition at line 710 of file class.t3lib_db.php. |
|
Returns the number of selected rows. mysql_num_rows() wrapper function Usage count/core: 85
Definition at line 710 of file class.t3lib_db.php. |
|
Open a (persistent) connection to a MySQL server mysql_pconnect() wrapper function Usage count/core: 12
Definition at line 809 of file class.t3lib_db.php. |
|
Open a (persistent) connection to a MySQL server mysql_pconnect() wrapper function Usage count/core: 12
Definition at line 809 of file class.t3lib_db.php. |
|
Executes query mysql_query() wrapper function Usage count/core: 1
Definition at line 685 of file class.t3lib_db.php. References debug(), and sql_query(). |
|
Executes query mysql_query() wrapper function Usage count/core: 1
Definition at line 685 of file class.t3lib_db.php. References debug(). Referenced by sql_query(). |
|
Select a MySQL database mysql_select_db() wrapper function Usage count/core: 8
Definition at line 826 of file class.t3lib_db.php. |
|
Select a MySQL database mysql_select_db() wrapper function Usage count/core: 8
Definition at line 826 of file class.t3lib_db.php. Referenced by admin_get_dbs(). |
|
Removes the prefix "GROUP BY" from the input string. This function is used when you call the SELECTquery() function and want to pass the GROUP BY parameter by can't guarantee that "GROUP BY" is not prefixed. Generally; This function provides a work-around to the situation where you cannot pass only the fields by which to order the result. Usage count/core: 1
Definition at line 594 of file class.t3lib_db.php. |
|
Removes the prefix "GROUP BY" from the input string. This function is used when you call the SELECTquery() function and want to pass the GROUP BY parameter by can't guarantee that "GROUP BY" is not prefixed. Generally; This function provides a work-around to the situation where you cannot pass only the fields by which to order the result. Usage count/core: 1
Definition at line 594 of file class.t3lib_db.php. |
|
Removes the prefix "ORDER BY" from the input string. This function is used when you call the exec_SELECTquery() function and want to pass the ORDER BY parameter by can't guarantee that "ORDER BY" is not prefixed. Generally; This function provides a work-around to the situation where you cannot pass only the fields by which to order the result. Usage count/core: 11
Definition at line 580 of file class.t3lib_db.php. |
|
Removes the prefix "ORDER BY" from the input string. This function is used when you call the exec_SELECTquery() function and want to pass the ORDER BY parameter by can't guarantee that "ORDER BY" is not prefixed. Generally; This function provides a work-around to the situation where you cannot pass only the fields by which to order the result. Usage count/core: 11
Definition at line 580 of file class.t3lib_db.php. |
|
Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. Usage count/core: 6
Definition at line 368 of file class.t3lib_db.php. References UPDATEquery(). |
|
Creates an UPDATE SQL-statement for $table where $where-clause (typ. 'uid=...') from the array with field/value pairs $fields_values. Usage count/core: 6
Definition at line 368 of file class.t3lib_db.php. Referenced by exec_UPDATEquery(), and UPDATEquery(). |