Related Item Lookup Error!
SELECT `items`.`item_ID`, `items`.`item_pic`, `departments`.`dept_belongs_to`, `departments`.`dept_name` FROM `items` LEFT JOIN `departments` USING (`dept_ID`) WHERE `departments`.`dept_belongs_to` = AND `item_pic` IS NOT NULL ORDER BY RAND() LIMIT 4
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND `item_pic` IS NOT NULL ORDER BY RAND() LIMIT 4' at line 5