1054 - Unknown column 'p.products_sold' in 'where clause'
select distinct
p.products_id,
p.products_image,
p.products_price,
p.manufacturers_id,
pd.products_name,
p.products_tax_class_id,
if (isnull(pg.customers_group_price), p.products_price, pg.customers_group_price) as products_price,
p.products_date_added,
p.products_image
from ((jos_jstore_products p
left join jos_jstore_products_groups pg on p.products_id = pg.products_id and pg.customers_group_id = 'G')
left join jos_jstore_specials s on p.products_id = s.products_id),
jos_jstore_products_description pd
where
p.products_status = '1' and p.products_sold = '0'
and pd.products_id = p.products_id
and pd.language_id = '1'
and p.products_group_access like '%G%'
and DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= p.products_date_added
order by rand(), p.products_date_added desc limit 3
[TEP STOP]
|