[TYPO3] Accessing DB from FE

Rudy Gnodde rgn at windinternet.nl
Wed Oct 31 12:01:23 CET 2007


Ivan Gomez Rodriguez wrote:
> We recently discover following tslib_cobj functions. It seems the better
> way to access database but we don't know if they are used by everybody
> or they are deprecated.
> 
> function DBgetDelete($table, $uid, $doExec=FALSE)
> function DBgetUpdate($table, $uid, $dataArr, $fieldList, $doExec=FALSE)
> function DBgetInsert($table, $pid, $dataArr, $fieldList, $doExec=FALSE)
> 
> function exec_getQuery($table, $conf)
> function getQuery($table, $conf, $returnQueryArray=FALSE)
> 
> In adding, we don't know the correct way to use exec_getQuery,
> especially in use of $conf array.
> 
> Could somebody tell me if this functions are really the better way and
> how use them correctly?
> 
> Thank in advance,
> 

Hello Ivan,

I mostly use the functions exec_SELECTgetRows, exec_SELECTquery, 
exec_DELETEquery, exec_UPDATEquery and exec_INSERTquery in the t3lib_db 
class. You can access them through the global TYPO3_DB variable 
($GLOBALS['TYPO3_DB']->exec_...) and if you search for these functions 
in your favorite search engine you should be able to find a reference 
for them.

Regards,

Rudy Gnodde
WIND Internet


More information about the TYPO3-english mailing list