An Error Was Encountered

Error Number: 1054

Unknown column 'c.brand_id' in 'where clause'

SELECT products.category_id,products_details.product_name,products_details.product_description,products.product_id,products_details.url_key,products.brand_id,products.price FROM products INNER JOIN products_details ON products.product_id=products_details.product_id LEFT JOIN attributes2items ON attributes2items.items_id = products.product_id WHERE products_details.language_id=1 AND (attributes2items.locales_id='1' OR attributes2items.locales_id IS NULL ) AND c.brand_id=93 AND products.category_id=128 AND products.active='1' GROUP BY products.product_id,products.category_id