$result = mysql_query("SELECT s.subnet_id, s.subnet_address, s.subnet_mask FROM subnet s INNER JOIN subnetlocation sl ON s.subnet_id=sl.subnet_id WHERE sl.location_id='$location_id' ORDER BY subnet_address");
$result = mysql_query("SELECT s.subnet_id, s.subnet_address, s.subnet_mask FROM subnet s INNER JOIN subnetlocation sl ON s.subnet_id=sl.subnet_id WHERE sl.location_id='$location_id' ORDER BY INET_ATON(subnet_address)");
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE subnet_address LIKE '$needle' OR subnet_info LIKE '%$needle%' ORDER BY subnet_address");
$result = mysql_query("SELECT subnet_id, subnet_address FROM subnet WHERE subnet_address LIKE '$needle' OR subnet_info LIKE '%$needle%' ORDER BY INET_ATON(subnet_address)");