SQL error (No database selected)
in (
select page_id,mode,last_visit<'2021-04-01' from pages
    where substring_index(pages.name,'/',-1)='tos.php'
)

SQL error (No database selected)
in (
	select page_id,last_visit<'2021-04-01' from pages
	    where 
	    substring_index(pages.name,'/',-1)='tos.php'
)

SQL error (No database selected)
in (
    select title,header,footer,background,length(bg_image),
	font_color,font_size,length(header_img),meta,banner_text
    from pages
    where page_id=''
)

SQL error (No database selected)
in (
    select /*length(header),*/header_align,length(footer),footer_align,
	header_html,footer_html,length(logo),logo_align,toptable_color,bottomtable_color,
	topnav_textcolor,topnav_color,
	textmain,length(mainimg),length(mainimg2),toptable_color,bottomtable_color,
	length(main_footer),main_footer_align,active,
	thicktopbartext_color,smallbartext_color,footerbartext_color,leftnav_color,
	leftnavactive_color,topnavlink_color,hyperlink_color,paragraph_color,heading2_color,
	rightsideheading_color,beforeloginrightsideheading_color,facebook_link,twitter_link,subscribe_rss_link,show_facebook_link,show_twitter_link,show_rss_link,open_sepage
    from navlinks
)

SQL error (No database selected)
in (
    update pages set hits=hits+1,last_visit=now()
    where page_id=''
)

SQL error (No database selected)
in (
    select /*top_navigation,topnav_color,topnav_textcolor,*/
	links_color,powered/*,length(powered_img),*/navbutton_bg,powered_bg
    from config
)

SQL error (No database selected)
in (
select flood_protect, aff_link_like, sw_link_tracker, sw_tell, sw_link_guard, allow_refer from affiliate_config
)

SQL error (No database selected)
in (
select subtable_color from navlinks
)

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


    SQL error (No database selected)
    in (
    select name,url,color,def from navigation	where active=1 and pub='1' order by sort asc
    )

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

SQL error (No database selected)
in (
    select footer_color
    from navlinks
)