Documentation TYPO3 par Ameos

t3lib_sqlengine Class Reference

Inheritance diagram for t3lib_sqlengine:

Inheritance graph
[legend]
Collaboration diagram for t3lib_sqlengine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 init ($config, &$pObj)
 resetStatusVars ()
 processAccordingToConfig (&$value, $fInfo)
 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)
 sql_query ($query)
 sql_error ()
 sql_insert_id ()
 sql_affected_rows ()
 quoteStr ($str)
 admin_get_tables ()
 admin_get_fields ($tableName)
 admin_get_keys ($tableName)
 admin_query ($query)
 readDataSource ($table)
 saveDataSource ($table)
 selectFromData ($table, $where)
 select_evalSingle ($table, $config, &$itemKeys)
 getResultSet ($keys, $table, $fieldList)
 debug_printResultSet ($array)
 init ($config, &$pObj)
 resetStatusVars ()
 processAccordingToConfig (&$value, $fInfo)
 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)
 sql_query ($query)
 sql_error ()
 sql_insert_id ()
 sql_affected_rows ()
 quoteStr ($str)
 admin_get_tables ()
 admin_get_fields ($tableName)
 admin_get_keys ($tableName)
 admin_query ($query)
 readDataSource ($table)
 saveDataSource ($table)
 selectFromData ($table, $where)
 select_evalSingle ($table, $config, &$itemKeys)
 getResultSet ($keys, $table, $fieldList)
 debug_printResultSet ($array)

Public Attributes

 $data = array()
 $errorStatus = ''
 $lastInsertedId = 0
 $lastAffectedRows = 0

Detailed Description

Definition at line 102 of file class.t3lib_sqlengine.php.


Member Function Documentation

t3lib_sqlengine::admin_get_fields tableName  ) 
 

(DUMMY) Returns information about each field in the $table

Parameters:
string Table name
Returns:
array Field information in an associative array with fieldname => field row

Definition at line 495 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::admin_get_fields tableName  ) 
 

(DUMMY) Returns information about each field in the $table

Parameters:
string Table name
Returns:
array Field information in an associative array with fieldname => field row

Definition at line 495 of file class.t3lib_sqlengine.php.

Referenced by exec_INSERTquery(), and exec_UPDATEquery().

t3lib_sqlengine::admin_get_keys tableName  ) 
 

(DUMMY) Returns information about each index key in the $table

Parameters:
string Table name
Returns:
array Key information in a numeric array

Definition at line 506 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::admin_get_keys tableName  ) 
 

(DUMMY) Returns information about each index key in the $table

Parameters:
string Table name
Returns:
array Key information in a numeric array

Definition at line 506 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::admin_get_tables  ) 
 

(DUMMY) Returns the list of tables from the database

Returns:
array Tables in an array (tablename is in both key and value)

Definition at line 484 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::admin_get_tables  ) 
 

(DUMMY) Returns the list of tables from the database

Returns:
array Tables in an array (tablename is in both key and value)

Definition at line 484 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::admin_query query  ) 
 

(DUMMY) mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!

Parameters:
string Query to execute
Returns:
pointer Result pointer

Definition at line 517 of file class.t3lib_sqlengine.php.

References sql_query().

t3lib_sqlengine::admin_query query  ) 
 

(DUMMY) mysql() wrapper function, used by the Install Tool and EM for all queries regarding management of the database!

Parameters:
string Query to execute
Returns:
pointer Result pointer

Definition at line 517 of file class.t3lib_sqlengine.php.

References sql_query().

t3lib_sqlengine::debug_printResultSet array  ) 
 

Returns the result set (in array) as HTML table. For debugging.

Parameters:
array Result set array (array of rows)
Returns:
string HTML table

Definition at line 785 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::debug_printResultSet array  ) 
 

Returns the result set (in array) as HTML table. For debugging.

Parameters:
array Result set array (array of rows)
Returns:
string HTML table

Definition at line 785 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::exec_DELETEquery table,
where
 

Execute DELETE query

Parameters:
string Table to delete from
string WHERE clause
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 326 of file class.t3lib_sqlengine.php.

References t3lib_sqlparser::parseWhereClause(), readDataSource(), resetStatusVars(), saveDataSource(), and selectFromData().

t3lib_sqlengine::exec_DELETEquery table,
where
 

Execute DELETE query

Parameters:
string Table to delete from
string WHERE clause
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 326 of file class.t3lib_sqlengine.php.

References t3lib_sqlparser::parseWhereClause(), readDataSource(), resetStatusVars(), saveDataSource(), and selectFromData().

t3lib_sqlengine::exec_INSERTquery table,
fields_values
 

Execute an INSERT query

Parameters:
string Table name
array Field values as key=>value pairs.
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 200 of file class.t3lib_sqlengine.php.

References admin_get_fields(), processAccordingToConfig(), readDataSource(), resetStatusVars(), and saveDataSource().

t3lib_sqlengine::exec_INSERTquery table,
fields_values
 

Execute an INSERT query

Parameters:
string Table name
array Field values as key=>value pairs.
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 200 of file class.t3lib_sqlengine.php.

References admin_get_fields(), processAccordingToConfig(), readDataSource(), resetStatusVars(), and saveDataSource().

t3lib_sqlengine::exec_SELECTquery select_fields,
from_table,
where_clause,
groupBy,
orderBy,
limit
 

Execute SELECT query

Parameters:
string List of fields to select from the table. This is what comes right after "SELECT ...". Required value.
string Table(s) from which to select. This is what comes right after "FROM ...". Required value.
string Optional additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->quoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
string Optional GROUP BY field(s), if none, supply blank string.
string Optional ORDER BY field(s), if none, supply blank string.
string Optional LIMIT value ([begin,]max), if none, supply blank string.
Returns:
object Returns result object, but if errors, returns false

Definition at line 377 of file class.t3lib_sqlengine.php.

References getResultSet(), t3lib_div::makeInstance(), t3lib_sqlparser::parseFromTables(), t3lib_sqlparser::parseWhereClause(), readDataSource(), resetStatusVars(), and selectFromData().

t3lib_sqlengine::exec_SELECTquery select_fields,
from_table,
where_clause,
groupBy,
orderBy,
limit
 

Execute SELECT query

Parameters:
string List of fields to select from the table. This is what comes right after "SELECT ...". Required value.
string Table(s) from which to select. This is what comes right after "FROM ...". Required value.
string Optional additional WHERE clauses put in the end of the query. NOTICE: You must escape values in this argument with $this->quoteStr() yourself! DO NOT PUT IN GROUP BY, ORDER BY or LIMIT!
string Optional GROUP BY field(s), if none, supply blank string.
string Optional ORDER BY field(s), if none, supply blank string.
string Optional LIMIT value ([begin,]max), if none, supply blank string.
Returns:
object Returns result object, but if errors, returns false

Definition at line 377 of file class.t3lib_sqlengine.php.

References getResultSet(), t3lib_div::makeInstance(), t3lib_sqlparser::parseFromTables(), t3lib_sqlparser::parseWhereClause(), readDataSource(), resetStatusVars(), and selectFromData().

t3lib_sqlengine::exec_UPDATEquery table,
where,
fields_values
 

Execute UPDATE query on table

Parameters:
string Table name
string WHERE clause
array Field values as key=>value pairs.
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 267 of file class.t3lib_sqlengine.php.

References admin_get_fields(), t3lib_sqlparser::parseWhereClause(), processAccordingToConfig(), readDataSource(), resetStatusVars(), saveDataSource(), and selectFromData().

t3lib_sqlengine::exec_UPDATEquery table,
where,
fields_values
 

Execute UPDATE query on table

Parameters:
string Table name
string WHERE clause
array Field values as key=>value pairs.
Returns:
boolean TRUE on success and FALSE on failure (error is set internally)

Definition at line 267 of file class.t3lib_sqlengine.php.

References admin_get_fields(), t3lib_sqlparser::parseWhereClause(), processAccordingToConfig(), readDataSource(), resetStatusVars(), saveDataSource(), and selectFromData().

t3lib_sqlengine::getResultSet keys,
table,
fieldList
 

[Describe function...]

Parameters:
[type] $keys: ...
[type] $table: ...
[type] $fields: ...
Returns:
[type] ...

Definition at line 740 of file class.t3lib_sqlengine.php.

References t3lib_div::trimExplode().

t3lib_sqlengine::getResultSet keys,
table,
fieldList
 

[Describe function...]

Parameters:
[type] $keys: ...
[type] $table: ...
[type] $fields: ...
Returns:
[type] ...

Definition at line 740 of file class.t3lib_sqlengine.php.

References t3lib_div::trimExplode().

Referenced by exec_SELECTquery().

t3lib_sqlengine::init config,
&$  pObj
 

Dummy function for initializing SQL handler. Create you own in derived classes.

Parameters:
array Configuration array from handler
object Parent object
Returns:
void

Definition at line 124 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::init config,
&$  pObj
 

Dummy function for initializing SQL handler. Create you own in derived classes.

Parameters:
array Configuration array from handler
object Parent object
Returns:
void

Definition at line 124 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::processAccordingToConfig &$  value,
fInfo
 

Processing of update/insert values based on field type.

Parameters:
[type] $$value: ...
[type] $fInfo: ...
Returns:
[type] ...

Definition at line 145 of file class.t3lib_sqlengine.php.

References t3lib_div::intInRange(), and t3lib_sqlparser::parseFieldDef().

t3lib_sqlengine::processAccordingToConfig &$  value,
fInfo
 

Processing of update/insert values based on field type.

Parameters:
[type] $$value: ...
[type] $fInfo: ...
Returns:
[type] ...

Definition at line 145 of file class.t3lib_sqlengine.php.

References t3lib_div::intInRange(), and t3lib_sqlparser::parseFieldDef().

Referenced by exec_INSERTquery(), and exec_UPDATEquery().

t3lib_sqlengine::quoteStr str  ) 
 

Quoting strings for insertion in SQL queries

Parameters:
string String
Returns:
string String, with quotes escaped

Definition at line 459 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::quoteStr str  ) 
 

Quoting strings for insertion in SQL queries

Parameters:
string String
Returns:
string String, with quotes escaped

Definition at line 459 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::readDataSource table  ) 
 

Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably!

Parameters:
string Table name
Returns:
void
Todo:
Table locking tools?

Definition at line 542 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::readDataSource table  ) 
 

Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably!

Parameters:
string Table name
Returns:
void
Todo:
Table locking tools?

Definition at line 542 of file class.t3lib_sqlengine.php.

Referenced by exec_DELETEquery(), exec_INSERTquery(), exec_SELECTquery(), and exec_UPDATEquery().

t3lib_sqlengine::resetStatusVars  ) 
 

Reset SQL engine status variables (insert id, affected rows, error status)

Returns:
void

Definition at line 132 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::resetStatusVars  ) 
 

Reset SQL engine status variables (insert id, affected rows, error status)

Returns:
void

Definition at line 132 of file class.t3lib_sqlengine.php.

Referenced by exec_DELETEquery(), exec_INSERTquery(), exec_SELECTquery(), and exec_UPDATEquery().

t3lib_sqlengine::saveDataSource table  ) 
 

Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably!

Parameters:
string Table name
Returns:
void
Todo:
Table locking tools?

Definition at line 554 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::saveDataSource table  ) 
 

Dummy function for setting table data. Create your own. NOTICE: Handler to "table-locking" needs to be made probably!

Parameters:
string Table name
Returns:
void
Todo:
Table locking tools?

Definition at line 554 of file class.t3lib_sqlengine.php.

Referenced by exec_DELETEquery(), exec_INSERTquery(), and exec_UPDATEquery().

t3lib_sqlengine::select_evalSingle table,
config,
&$  itemKeys
 

[Describe function...]

Parameters:
[type] $table: ...
[type] $config: ...
[type] $itemKeys: ...
Returns:
[type] ...

Definition at line 619 of file class.t3lib_sqlengine.php.

References selectFromData().

t3lib_sqlengine::select_evalSingle table,
config,
&$  itemKeys
 

[Describe function...]

Parameters:
[type] $table: ...
[type] $config: ...
[type] $itemKeys: ...
Returns:
[type] ...

Definition at line 619 of file class.t3lib_sqlengine.php.

References selectFromData().

Referenced by selectFromData().

t3lib_sqlengine::selectFromData table,
where
 

[Describe function...]

Parameters:
[type] $table: ...
[type] $where: ...
Returns:
[type] ...

Definition at line 583 of file class.t3lib_sqlengine.php.

References select_evalSingle().

t3lib_sqlengine::selectFromData table,
where
 

[Describe function...]

Parameters:
[type] $table: ...
[type] $where: ...
Returns:
[type] ...

Definition at line 583 of file class.t3lib_sqlengine.php.

References select_evalSingle().

Referenced by exec_DELETEquery(), exec_SELECTquery(), exec_UPDATEquery(), and select_evalSingle().

t3lib_sqlengine::sql_affected_rows  ) 
 

Returns affected rows (of UPDATE and DELETE queries)

Returns:
integer Last amount of affected rows.

Definition at line 449 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_affected_rows  ) 
 

Returns affected rows (of UPDATE and DELETE queries)

Returns:
integer Last amount of affected rows.

Definition at line 449 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_error  ) 
 

Returns most recent error

Returns:
string Error message, if any

Definition at line 431 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_error  ) 
 

Returns most recent error

Returns:
string Error message, if any

Definition at line 431 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_insert_id  ) 
 

Returns most recently create unique ID (of INSERT queries)

Returns:
integer Last unique id created.

Definition at line 440 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_insert_id  ) 
 

Returns most recently create unique ID (of INSERT queries)

Returns:
integer Last unique id created.

Definition at line 440 of file class.t3lib_sqlengine.php.

t3lib_sqlengine::sql_query query  ) 
 

Performs an SQL query on the "database"

Parameters:
string Query to execute
Returns:
object Result object or false if error

Definition at line 420 of file class.t3lib_sqlengine.php.

References t3lib_div::makeInstance().

t3lib_sqlengine::sql_query query  ) 
 

Performs an SQL query on the "database"

Parameters:
string Query to execute
Returns:
object Result object or false if error

Definition at line 420 of file class.t3lib_sqlengine.php.

References t3lib_div::makeInstance().

Referenced by admin_query().


The documentation for this class was generated from the following files:


Généré par Les experts TYPO3 avec  doxygen 1.4.6