在我的数据库中,我用INET_ATON存储IP (INET_ATON)mysqli_query( $con, "INSERT INTO table ( ip ) VALUES ( INET_ATON( '$ip' ) )" );SELECT * FROM table WHERE ip = INET_<e
所以我创建了一个视图"ip_range",它基本上是一个ip范围,列是现在,当我试图在位于两个范围之间的视图中搜索一个条目时,我总是会得到一个错误select * from ip_range WHERE "2624412513" BETWEEN INET_ATON(ip) AND (INET_ATON(ip)+(prefix);
我很确定这是语法错误什么的select * from ip_range WHERE
from where event.sid=iphdr.sid and event.cid=iphdr.cid and iphdr.ip_dst >= inet_aton('x.x.x.1') and iphdr.ip_dst <= inet_aton('x.x.x.255')
or iphdr.ip_dst >= inet_aton('x.x.y.1') and iphdr.ip_dst<= inet_aton
我的查询类似于这样的$result=mysql_query("Select inet_aton(network_start_ip),inet_aton(network_last_ip) from blacklisted$stat_ip.’BETWEEN inet_aton(network_start_ip) AND inet_aton(network_last_ip)")。这将返回一个0计数,这不是预期的输出。$ip_Num=ip2long($stat_ip);
function blacklis