select * from popups where idSpace=2 and (active=1 or authorized_ips like '%10.2.246.55%') and (id in (select idPopup from popups_pages where url like '/index.php' and active=1) or id not in (select idPopup from popups_pages where active=1))
10.2.246.55




























































