Please can anyone tell me what’s wrong with this MySQL query
SELECT count(items.id) AS numrows
FROM items, subcategories
WHERE items.`base_school` = 'UNN'
AND items.subcategory = subcategories.id
AND subcategories.parent_category = 3
JOIN `item_images`
ON items.id=`item_images`.`item_id`
It keeps throwing up this error:
#1064 – 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 ‘JOINitem_imagesON items.id=item_images.item_id‘ at line
1
You have the
WHEREclause in the wrong location, try this: