[TYPO3-mvc] question marks in custom queries
Thomas Mammitzsch
thomas at visualworx.de
Tue Jul 27 14:48:41 CEST 2010
hi list,
if i use a custom query like this:
public function findByOptinCode($optincode) {
$query = $this->createQuery();
$query->getQuerySettings()->setRespectEnableFields(FALSE);
$query->matching(
$query->logicalAnd(
array(
$query->equals('optincode',
$optincode),
$query->equals('deleted', 0)
)
)
);
$result = $query->execute();
return $result[0]; //we only expect one result, so
return only first row
}
i get no result because the sql statement looks like that:
SELECT fe_users.* FROM fe_users WHERE (fe_users.optincode = ? AND
fe_users.deleted = ?) AND
(fe_users.tx_extbase_type='Tx_Myext_Domain_Model_frontendUser') AND
fe_users.pid IN (72)
why are there question marks inserted in the constraint?
regards, Thomas
More information about the TYPO3-project-typo3v4mvc
mailing list