Select count(*) as n from (Select count(advs_properties.id) as n from advs, advs_properties where advs.id=advs_properties.idt and advs.cost>0 and advs_properties.sizecost>0 and advs.hide=0 and advs.main="mens" and advs.cat=32 and advs.saleprice>0 group by advs_properties.idt, advs_properties.color) as t limit 1
Unknown column 'advs.saleprice' in 'where clause'
Select advs.id, advs.marka, advs.cat, advs.subcat, advs.timeupdate, advs.hot, (Select 1 from tree_tags_link, tree_tags where tree_tags.id=tree_tags_link.idt and advs.id=tree_tags_link.idc and tree_tags.name like "%newyear%" limit 1) as newyear, advs.new, advs.product, advs.collect,
advs_properties.sizecost as cost, advs_properties.sale, advs_properties.sizesale as saleprice, advs_properties.color,
(select advs_photo.fname from advs_photo where advs_photo.idt=advs.id order by if(advs_photo.alt=advs_properties.color,tomain+10,tomain) desc limit 1) as photo,
(select 1 from advs_video where advs_video.idt=advs.id and ( advs_video.alt="" or advs_video.alt=advs_properties.color) limit 1) as video
from advs, advs_properties where advs.id=advs_properties.idt and advs.cost>0 and advs_properties.sizecost>0 and advs.hide=0 and advs.main="mens" and advs.cat=32 and advs.saleprice>0 group by advs_properties.idt, advs_properties.color order by if(photo!="",1,0) desc, advs_properties.timecreate desc, timeupdate desc, id desc limit 0, 24
Unknown column 'advs.saleprice' in 'where clause'
Ничего не найдено