SQL error (No database selected)
in (
		select banner,prodgroup_id from banner_ads
		where banner_id='22'
)

SQL error (No database selected)
in (
select aff_link_like from affiliate_config
)

SQL error (No database selected)
in (
select link from product_groups where prodgroup_id = ''
)

SQL error (No database selected)
in (
select type,sale_wait from product_groups
			       where prodgroup_id=''
)

SQL error (No database selected)
in (
insert into views (banner_id,banner_type,d,ip,referrer,affiliate_id,prod_id)
	      values ('22','0',now(),'52.91.0.112','','1248',1)
)

SQL error (No database selected)
in (
select count(*) from clicks where date_clicked>='2022-01-01 00:00:00' and date_clicked<='2022-01-20 23:59:59'
)

SQL error (No database selected)
in (
select count(*) from views where YEAR(d) = YEAR(CURDATE()) AND MONTH(d) = MONTH(CURDATE())
)