An Error Was Encountered
Error Number: 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 'AND w.active = 1 ORDER BY company_name' at line 1
SELECT *, a.first_name,a.last_name,a.company_name,w.id FROM works AS w, users AS a WHERE w.belongs_to = a.id AND cattech= AND w.active = 1 ORDER BY company_name