Is there any way in which the below query can be modified so that I can get all the results for the cases in which the taggable_id is null and to group the results by taggable_id where there is taggable_id?
select business.ID,business.NAME,business.CATCH_LINE,business.ADDRE SS_ID,sf_tagging.TAGGABLE_ID from business join member on business.MEMBER_ID=member.ID left join sf_tagging on (business.ID=sf_tagging.TAGGABLE_ID and sf_tagging.TAGGABLE_MODEL='Business') left join sf_tag on (sf_tagging.TAG_ID=sf_tag.ID) where (business.NAME LIKE '%testing%' or sf_tag.TRIPLE_KEY= 'testing') and member.STATUS='active' and business.STATUS= 'active' group by sf_tagging.TAGGABLE_ID Thx in advance Dijil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
