realip 87 224 247 195 cursor execute SELECT host realip hostname ifnam

1
2
3
4
5
realip = "87.224.247.195"
cursor.execute("""SELECT host(u.realip),g.hostname || '-' || s.ifname, host(u.localip), u.extauth
from users u, segments_sus s, gates g
where s.id=u.segmentid and g.id=s.gateid and realip=(%s)""",
(realip,))