ips=Ip.where(:reserved => false).order("INET_ATON(address) ASC")
You can save numeric value of ip address also with
INET_ATON, then you can get the string value by "INET_NTOA()" mysql function.Here is the link about mysql miscellaneous functions:
http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html
Good luck!
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.