You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this returns all results that match all the given categories. I need to be able to only return the results that match both. Changing the 'orWhere' to simply 'where' returns no results as the singular JOIN can't match multiple conditions.
The raw query I'm looking for is roughly:
JOIN product_to_categories AS ptoc1
ON ptoc1.product =products.id AND (ptoc1.category_id='4')
JOIN product_to_categories AS ptoc2
ON ptoc2.product =products.id AND (ptoc2.category_id='5')
I've spent a few hours experimenting, can this be achieved using Pixie?
Thank you.
The text was updated successfully, but these errors were encountered:
Hey,
I need the ability to do multiple joins with a conditional 'AND' on each one.
For example the current query builder reads:
However this returns all results that match all the given categories. I need to be able to only return the results that match both. Changing the 'orWhere' to simply 'where' returns no results as the singular JOIN can't match multiple conditions.
The raw query I'm looking for is roughly:
I've spent a few hours experimenting, can this be achieved using Pixie?
Thank you.
The text was updated successfully, but these errors were encountered: