Solutions Open Source

Référence de la classe t3lib_sqlengine

Graphe d'héritage de t3lib_sqlengine:

Inheritance graph
[légende]
Graphe de collaboration de t3lib_sqlengine:

Collaboration graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 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)

Attributs publics

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


Documentation des fonctions membres

t3lib_sqlengine::init ( config,
&$  pObj 
)

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

Paramètres:
array Configuration array from handler
object Parent object
Renvoie:
void

Réimplémentée dans tx_dbal_handler_openoffice, tx_dbal_handler_rawmysql, et tx_dbal_handler_xmldb.

t3lib_sqlengine::resetStatusVars (  ) 

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

Renvoie:
void

t3lib_sqlengine::processAccordingToConfig ( &$  value,
fInfo 
)

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ètres:
mixed $value The input value to process
array $fInfo Field configuration data
Renvoie:
mixed The processed input value

t3lib_sqlengine::exec_INSERTquery ( table,
fields_values 
)

Execute an INSERT query

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

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::exec_UPDATEquery ( table,
where,
fields_values 
)

Execute UPDATE query on table

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

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::exec_DELETEquery ( table,
where 
)

Execute DELETE query

Paramètres:
string Table to delete from
string WHERE clause
Renvoie:
boolean TRUE on success and FALSE on failure (error is set internally)

Réimplémentée dans tx_dbal_handler_rawmysql.

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

Execute SELECT query

Paramètres:
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->fullQuoteStr() 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.
Renvoie:
object Returns result object, but if errors, returns false

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::sql_query ( query  ) 

Performs an SQL query on the "database"

Paramètres:
string Query to execute
Renvoie:
object Result object or false if error

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::sql_error (  ) 

Returns most recent error

Renvoie:
string Error message, if any

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::sql_insert_id (  ) 

Returns most recently create unique ID (of INSERT queries)

Renvoie:
integer Last unique id created.

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::sql_affected_rows (  ) 

Returns affected rows (of UPDATE and DELETE queries)

Renvoie:
integer Last amount of affected rows.

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::quoteStr ( str  ) 

Quoting strings for insertion in SQL queries

Paramètres:
string Input String
Renvoie:
string String, with quotes escaped

Réimplémentée dans tx_dbal_handler_rawmysql.

t3lib_sqlengine::admin_get_tables (  ) 

(DUMMY) Returns the list of tables from the database

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

Réimplémentée dans tx_dbal_handler_openoffice, tx_dbal_handler_rawmysql, et tx_dbal_handler_xmldb.

t3lib_sqlengine::admin_get_fields ( tableName  ) 

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

Paramètres:
string Table name
Renvoie:
array Field information in an associative array with fieldname => field row

Réimplémentée dans tx_dbal_handler_openoffice, tx_dbal_handler_rawmysql, et tx_dbal_handler_xmldb.

t3lib_sqlengine::admin_get_keys ( tableName  ) 

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

Paramètres:
string Table name
Renvoie:
array Key information in a numeric array

Réimplémentée dans tx_dbal_handler_openoffice, tx_dbal_handler_rawmysql, et tx_dbal_handler_xmldb.

t3lib_sqlengine::admin_query ( query  ) 

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

Paramètres:
string Query to execute
Renvoie:
pointer Result pointer

Réimplémentée dans tx_dbal_handler_openoffice, tx_dbal_handler_rawmysql, et tx_dbal_handler_xmldb.

t3lib_sqlengine::readDataSource ( table  ) 

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

Paramètres:
string Table name
Renvoie:
void
À faire:
Table locking tools?

Réimplémentée dans tx_dbal_handler_openoffice, et tx_dbal_handler_xmldb.

t3lib_sqlengine::saveDataSource ( table  ) 

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

Paramètres:
string Table name
Renvoie:
void
À faire:
Table locking tools?

Réimplémentée dans tx_dbal_handler_openoffice, et tx_dbal_handler_xmldb.

t3lib_sqlengine::selectFromData ( table,
where 
)

PHP simulation of SQL "SELECT" Yet EXPERIMENTAL!

Paramètres:
string Table name
array Where clause parsed into array
Renvoie:
array Array of keys pointing to result rows in $this->data[$table]

t3lib_sqlengine::select_evalSingle ( table,
config,
&$  itemKeys 
)

Evalutaion of a WHERE-clause-array. Yet EXPERIMENTAL

Paramètres:
string Tablename
array WHERE-configuration array
array Data array to work on.
Renvoie:
void Data array passed by reference
Voir également:
selectFromData()

t3lib_sqlengine::getResultSet ( keys,
table,
fieldList 
)

Returning result set based on result keys, table and field list

Paramètres:
array Result keys
string Tablename
string Fieldlist (commaseparated)
Renvoie:
array Result array with "rows"

t3lib_sqlengine::debug_printResultSet ( array  ) 

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

Paramètres:
array Result set array (array of rows)
Renvoie:
string HTML table


Documentation des données membres

t3lib_sqlengine::$data = array()

t3lib_sqlengine::$errorStatus = ''

t3lib_sqlengine::$lastInsertedId = 0

t3lib_sqlengine::$lastAffectedRows = 0


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:42:34 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3