I am trying to select all from stuff and count the total amount of items in morestuff where stuff id = morestuff id.
select *,
COUNT(morestuff.items) as total
from stuff,
morestuff
where stuff.id = '{$id}'
and morestuff.id = stuff.id
Obviously there is something wrong with my query, can anyone help?
This may be another option: