I'm doing a virtual store from scratch and the customer asked me to do the following logic:
- Selects first available products with photo
- Then select those available without a photo
- Next select unavailable with photo
- then select the non-photo unavailable
The problem is that I have no idea how to do this, because I know only to perform the selection with the where status = '1' AND photo! = '' , how can I do to follow the above order?