MOTOZ

1054 - Unknown column 'p.products_type' in 'on clause'

select count(1) as total from (select pd.products_name, p.products_image, p.products_model, p.products_type, pd.extra_value_id16, pd.extra_value_id18, pd.extra_value_id17, count(1) as subproducts, f.delivery_lead_time, p.products_id, p.manufacturers_id, min(p.products_price/100*(100-0)) as products_price, p.products_tax_class_id, min(IF(s.status, s.specials_new_products_price, NULL)) as specials_new_products_price, min(IF(s.status, s.specials_new_products_price, p.products_price/100*(100-0))) as final_price, m.manufacturers_name, if(ptd.ptype_id between 31 and 33,ptd.ptype_description,null) as kind, pd.products_url, ifnull(fp.feed_products_status,0) as feed_products_status, fps.feed_products_status_name, fps.feed_products_status_description, if(ifnull(pt.sort_order,0)=0,9999,pt.sort_order) as pt_sort_order, ifnull(m.sort_order,99999) as m_sort_order from products p left join feed_products fp using (feed_products_id) left join feed_products_status fps on (fps.feed_products_status_id = fp.feed_products_status and fps.language_id = 4) left join specials s on (p.products_id = s.products_id and s.customers_group_id = 0), products_description pd left join product_type_descriptions ptd on ( ptd.ptype_id = p.products_type and ptd.languages_id = 4 ) left join product_types pt on (pt.ptype_id = p.products_type) , manufacturers m, feeds f where p.redirect_products_id is null and p.products_feed=f.feed_id and p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '4' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '105' and p.only_in_virtual = 0 and products_price > 0 and specials_new_products_price > 0 and feed_products_status <> 5 group by p.products_id, pd.products_name, p.products_image, p.products_model, p.products_type, pd.extra_value_id16, pd.extra_value_id18, pd.extra_value_id17, f.delivery_lead_time, p.manufacturers_id, p.products_tax_class_id, m.manufacturers_name, kind, pd.products_url, feed_products_status, fps.feed_products_status_name, fps.feed_products_status_description, pt_sort_order, m_sort_order order by if(ifnull(pt.sort_order,0)=0,9999,pt.sort_order) asc, ifnull(m.sort_order,99999), pd.products_name ) a

[TEP STOP]