I am using MySQL
and I have this select
:
Select
TOP 15
Item
DescriptionforSales
, (select top 1 Retail from Pricelist where Pricelist.peachitemid = products.peachitemid ) as Retail "
From products where imagen=1 and active=1
When I convert it to dql
until here I have no problem:
$em=$this->getDoctrine()->getManager();
$dql="SELECT p.ItemID, p.DescriptionforSales
FROM BackendBundle:Products p";
$query=$em->createQuery($dql);
$query=$em->createQuery($dql);
$query->setMaxResults(15);
The problem is when placing the subquery. Any suggestions?
Greetings