Message: Unknown column 'photos.assignment' in 'where clause'
SQL: SELECT photos.*, users.first_name, users.last_name, users.name, users.title FROM photos JOIN users ON users.id = photos.user_id JOIN products ON products.id = photos.target_id WHERE photos.content_type = 'product' AND photos.assignment IN ('all','ts') AND photos.is_approved = 1 AND products.disabled = 0 AND '5' IN (products.activity_id, products.activity2_id, products.activity3_id) ORDER BY RAND() LIMIT 14