Exception: Error: Unknown column 'cp.category_idxs' in 'WHERE'
Error No: 1054
select distinct p.*, cp.*, COALESCE(opt.price, p.price) AS price, p.is_package as bus_is_package, (select sum(quantity) from `sto__products` sp where sp.product_id = p.id) as available, (select price from com__pd__product_specials ps where ps.product_id = p.id and ((ps.start_date is null or UNIX_TIMESTAMP(ps.start_date) < UNIX_TIMESTAMP('2026-10-19 10:16:15')) and (ps.end_date is null or UNIX_TIMESTAMP(ps.end_date) > UNIX_TIMESTAMP('2026-10-19 10:16:15'))) order by ps.priority asc, ps.price asc limit 1) as special, (select ROUND(avg(rating), 1) from com__pd__product_reviews r1 left join com__pd__products cp1 on (r1.product_id = cp1.id) where (`cp1`.`id` = p.id or `cp1`.`master_idx` = p.id) and `r1`.`status` = 1) as rating, (select count(*) from com__pd__product_reviews r2 left join com__pd__products cp2 on (r2.product_id = cp2.id) where (`cp2`.`id` = p.id or `cp2`.`master_idx` = p.id) and `r2`.`status` = 1) as reviews from com__pd__products cp left join bus__products p on (p.id = cp.id) left join bus__product_opts opt on opt.product_id = p.id left join bus__categories c on c.id = p.category_id left join com__pd__categories cc on (cp.category_idx = cc.idx or FIND_IN_SET(cc.idx, IFNULL(cp.category_idxs, '')) or cc.id = p.category_id or cc.id = c.parent_id) where ((cp.category_idx = '2' OR FIND_IN_SET('2', IFNULL(cp.category_idxs, ''))) OR cc.idx = '2') and (cp.status = 1 and cp.is_show = 1 and cp.is_included = 0 and (p.deleted_at is null and p.status = 1 or cp.id = 0) and master_idx = 0) order by p.created_at desc, p.id desc limit 0,30 in /www/wwwroot/clone/web/system/library/db/mysqli.php on line 43