Mysql error:
1046: No database selected
select * from pages p, template t where p.tid = t.idt and t.vis = 'map.php' order by id asc