Hi there,
I can not seem to figure out where
to put my WHERE clause in the next query:
SELECT s.id,
s.kind_id,
s.active,
s.name,
COUNT(p.id) AS 'quantity'
FROM pr_series s
LEFT JOIN pr_products p
ON p.series_id=s.id
GROUP BY s.id, s.name
WHERE s.kind_id = '1'
ORDER BY s.name ASC
LIMIT 0, 20
This gives me a mysql error, and i can't find out where to put "WHERE
s.kind_id = '1'". I'm new to the LEFT JOIN & GROUP BY things, i've read
about it but, as i said, can't get it to work ... :(
Are the WHERE and JOIN / GROUP BY parts not meant to be in 1 query?
Any help would be greatly appreciated ...
Greetings Frizzle.