select a.*, b.Name as Grp, count(c.id) as Shapes from catalog_categories a left outer join catalog_shapes c on a.ID = c.CategoryID and c.Location = 'yes' and c.status = 'enabled', catalog_groups b where a.status = 'enabled' and a.groupid = b.id group by b.ID, a.ID having count(c.id) > 0 order by b.orderid, a.orderid asc
Error:
Unknown column 'c.Location' in 'on clause'
Trace: (database.class.php:118)
(data.class.php:24)
(main.class.php:30)
(default.class.php:63)
(default.class.php:35)
(default.class.php:333)
(main.class.php:326)
(manager.class.php:22)
(document.class.php:157)
(document.class.php:90)
(index.php:13)