Aaron Clausen wrote:

I'm running 3.23.49 on a Win2k machine and wonder if anybody has
> some advice on how to write queries dealing with IP addresses.
> Specifically, I have a table with an ip address field. I want to
> be able to do queries based on subnet. Has anybody got anyting
> like this?

Yes, REGEXP / RLIKE will work fine for this -- for example:

SELECT hostname, ip FROM addr WHERE ip RLIKE '^192.168.10.[0-9]+$';

HTH!
--
Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

dream. code.




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to