SELECT * FROM tree t, content c WHERE t.category_id=c.category_id AND t.category_id=sites Unknown column 'sites' in 'where clause'