I have an extbase database query like below.
$query = $this->createQuery();
$result = $query->statement("Select * FROM table1 WHERE hidden = 0 AND deleted = 0 AND (".$PublicationYears.") AND logo != '' ORDER BY uid ASC LIMIT 0, ".$iLimit." ")->execute();
return $result;
$PublicationYears = "ttra = '12' or ttra = '13' or ttra = '14'";
I converted this query as follows,
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(FALSE);
$query->matching( $query->logicalAnd(
$query->equals('deleted', 0),
$query->equals('hidden', 0)
));
$query->matching($query->logicalAnd($PublicationYears));
$query->matching($query->logicalNot(
$query->equals('logo', '')
));
$query->setOrderings(array('uid' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));
$query->setLimit((integer)$iLimit);
$Result = $query->execute();
return $Result;
But the resultant query does not contain the query part related to,
$query->matching($query->logicalAnd($PublicationYears));
I think there are also other mistakes in the above query.
Please help me to create correct query.
Thanks in advance.