Hi,
I have a database of IP addresses, 10.0.0.1 to 10.0.254.254. The fields are IPAddress, Status, and Description. IPAddress is the primary key. I previously had a nice PHP site to manipulate these addresses, but lost it to drive failure. I'm trying to re-create the site, and am having difficulty with displaying the data.
I'd like to display the IP addresses organized by Class C's, i.e. 10.0.0.1 to 10.0.0.254, based on a small form where the user inputs the subnet they wish to view. The problem is, I want the addresses to display like this:
10.0.0.1 In Use Gateway router
10.0.0.2 In Use Firewall
10.0.0.3 In Use Blah blah blah
10.0.0.4 Unused
Instead I get this:
10.0.0.1 In Use Gateway Router
10.0.0.10 In Use Customer 1
10.0.0.100 In Use Customer 99
10.0.0.101 In Use Customer 100
10.0.0.102 In Use Customer 101
On the site that was lost, it seems that I was easily able to display the addresses in proper order. I'm using the statement:
SELECT from ipaddresses Where IPAddress like '10.0.0.%'
I've tried reading reams of documentation, and I've tried ORDER BY and GROUP BY with no luck. I don't remember having this much trouble last time.
Thanks.