<p>Eric,</p><p>SELECT * from ip_whatever ORDER BY<br
/>substring_index(ip_address,'.',-3) ASC;</p><p>or</p><p>In PHP the string
function you are looking for is explode('.',ip_address) which will break the
value at its periods and place the results in an array ip[0] to ip[3] for
example.</p><p>Frank</p><p>Quoting Eric Benoit <ebenoit@hopevale.com>:<br
/><br />> I know this is slightly off the topic of this list,<br />><br
/>> but I know there are some programmers out there ;)<br />><br />> I
have a column labled ip address, it is varchar, oddly enough I <br />> input
...ip addresses in it. ha ha ha<br />><br />> Here's my question:<br
/>><br />> When I query the column and do an "order by ip_address
ASC" the <br />> records won't ascend the way I want ex: 192.0.0.20,
192.0.0.112 and <br />> so on<br />><br />> instead they ascend this
way: 192.0.0.112, 192.0.0.20<br />><br />> I am guessing this is because
ASC doesn't like the periods?<br />><br />> A finger pointed in some
general direction would be great.<br />><br />> Thanks,<br />> Eric<br
/>> _______________________________________________<br />> nflug mailing
list<br />> nflug@nflug.org<br />> <a
href="/horde/services/go.php?url=http%3A%2F%2Fwww.nflug.org%2Fmailman%2Flistinfo%2Fnflug"
target="_blank">http://www.nflug.org/mailman/listinfo/nflug</a><br />><br
/></p>