Raised This Month: $ Target: $400
 0% 

How to define a large integer?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 11-02-2011 , 11:50   Re: How to define a large integer?
Reply With Quote #10

Quote:
Originally Posted by wwzw View Post
My IP address data like this:
0.0.0.0 0.255.255.255 IANA reserved address
......
192.168.0.0 192.168.255.255 Lan
......
Those are start and end ips.

If you convert them to ip and mask:
0.0.0.0 255.0.0.0 IANA reserved address
192.168.0.0 255.255.0.0 Lan

Then you can convert them to 4bytes signed int and insert to your table (let's say columns are network_address, network_mask, network_name).
and then you can do this:
PHP Code:
SELECT `network_nameFROM `table_nameWHERE `network_mask` & '%d' = `network_address`; 
__________________
Impossible is Nothing

Last edited by Sylwester; 11-02-2011 at 11:50.
Sylwester is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode