Try $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', #select 'tx_modatest_tabledozent', #from 'first_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['firstname'], 'tx_modatest_tabledozent'), #where *#'first_name=0', #where* '', '', ''); Cheers