0

Here I have mentioned my general sql query which I want to use in doctrine (Controller).I have tried a lot to resolve the problem but couldn't reach there.

SELECT p.id,p.label,p.video,p.tile,p.presentation_category_id,up.display_order 
FROM `tbl_user_presentations` AS up
LEFT JOIN `tbl_presentations` AS p 
ON up.presentation_id = p.id 
WHERE `user_id` = 1568 
AND p.active = 1
ORDER BY p.presentation_category_id, up.display_order

Here the user_id = 1568 is static but I want to display the data dynamically.

Thanks in advance.

blackbishop
  • 30,945
  • 11
  • 55
  • 76
  • See this: [How to do left join in Doctrine?](http://stackoverflow.com/questions/15087933/how-to-do-left-join-in-doctrine) – msanford Aug 19 '14 at 15:35
  • Working with symfony start from [*`Databases and Doctrine`*](http://symfony.com/doc/current/book/doctrine.html) and here is your [*`clue`*](http://symfony.com/doc/current/book/doctrine.html#entity-relationships-associations) – M Khalid Junaid Aug 19 '14 at 17:29

0 Answers0