[Astpp-commit] SF.net SVN: astpp: [2145] trunk/astpp-ip-map.agi
Brought to you by:
darrenkw
From: <dar...@us...> - 2007-11-02 03:48:19
|
Revision: 2145 http://astpp.svn.sourceforge.net/astpp/?rev=2145&view=rev Author: darrenkw Date: 2007-11-01 20:48:23 -0700 (Thu, 01 Nov 2007) Log Message: ----------- A tentative fix for the IP mapping problems. Modified Paths: -------------- trunk/astpp-ip-map.agi Modified: trunk/astpp-ip-map.agi =================================================================== --- trunk/astpp-ip-map.agi 2007-11-02 03:41:50 UTC (rev 2144) +++ trunk/astpp-ip-map.agi 2007-11-02 03:48:23 UTC (rev 2145) @@ -48,8 +48,13 @@ sub get_ip() { my ($number,$extension) = @_; my ($sql,$tmp); - $tmp = "SELECT * FROM ip_map WHERE ip = " . $astpp_db->quote($number) - . " AND prefix IS NULL OR $extension RLIKE prefix ORDER BY LENGTH(prefix) DESC LIMIT 1"; + $tmp = "SELECT * FROM ip_map WHERE ip = " . $astpp_db->quote($number); + +##### I know I wrote it with the OR statement for some reason but I can't figure out why. I'm leaving it here for now. +# $tmp = "SELECT * FROM ip_map WHERE ip = " . $astpp_db->quote($number) +# . " AND prefix IS NULL OR $extension RLIKE prefix ORDER BY LENGTH(prefix) DESC LIMIT 1"; +########### + print STDERR $tmp if $config->{debug} == 1; $AGI->verbose( "$tmp\n", $verbose ) if $config->{debug} == 1; $sql = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |