inet_aton()问题 [英] Problem with inet_aton()

查看:86
本文介绍了inet_aton()问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对inet_aton()有问题.在MySQl数据库中,IP以无符号INT(11)的形式存储,但是当我尝试访问该记录时,它总是失败.

I''m having a problem with inet_aton(). In the MySQl database the IP is stored as an INT(11) unsigned however when I try to access this record it always fails.

mysql_query(conn,"SELECT COUNT(*) FROM tblURLIP WHERE IP = inet_aton('65.39.148.34') And IPStatus = 1 And IPMax = 0");
		my_ulonglong i = 0;
		res_set = mysql_store_result(conn);
		my_ulonglong numrows = mysql_num_rows(res_set);
		LEGIT = mysql_fetch_row(res_set);
		if (atoi(LEGIT[i]) == 1) 

推荐答案

inet_aton(" 65.39.148.34)返回的数字是多少?
65x256 3 + 39x256 2 + 148x256 + 34 = 1093112866
公式是此处 [
what number does inet_aton(''65.39.148.34'') return exatly?
65x2563 + 39x2562 + 148x256 + 34 = 1093112866
The formula is here[^]


这篇关于inet_aton()问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆