Query is:select * from link_page where (heading='gallery' or friendly_url='gallery') and pagehead='m' and status='active'