select * from popups where idSpace=2 and (active=1 or authorized_ips like '%18.97.14.87%') and (id in (select idPopup from popups_pages where url like '/?gclid=CjwKCAiAv4n9BRA9EiwA30WNDwNmD66sJTU4iDHmoXTisHMgkAgpTMasrRt1h1CMrY05SLqXzz6yYxoCLmcQAvD_BwE' and active=1) or id not in (select idPopup from popups_pages where active=1))
18.97.14.87












































