[TYPO3-dev] A way to detect if table has a certain field
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Thu Sep 27 16:54:32 CEST 2007
Tapio Markula schrieb:
> $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(*)',$table,'pid='.$id.'
> AND deleted=0','', '', '');
BE:
$where = 'pid='.$id.'.t3lib_BEfunc::deleteClause()
FE:
$where = 'pid='.$id.'.$cObj->enableFields($table)
or
$where = 'pid='.$id.'.$cObj->enableFields($table,1) // selects hidden reco
Note that enable fields will also take start/stop time and group access
control into account. But I think you can call t3lib_BEfunc::deleteClause()
savely from the FE.
Masi
More information about the TYPO3-dev
mailing list