| Query / Запрос |
select c.id,c.location_id location,c.banner_id,b.name,b.target,b.url,b.text,b.image1,b.w,b.h from ad_camp c,ad_banners b
where c.banner_id=b.id and c.inwork='1' and c.pause='0' and c.datestart<1770165865
and (c.allpages=1 or c.treeurl like '%,114,%')
and c.extreeurl not like '%,114,%'
and c.timemin<=3 and c.timemax>=3
and c.daysview like '%,3,%'
order by rand() |