Hi. I've got IP addresses stored in the database as packed binaries. i.e. binary(4). I put them in there that way so that I could do bitwise logic on them to do subnet searches. e.g. ...WHERE `ip` & 'mask' = 'network'. Only it turns out that as far as I can tell MySQL can't do bit logic on strings, only integers. I came up with an onerous SQL call that eats the 4 bytes and makes an integer out of them but there's got to be a better way. The worst case is that I redo the database to have all the IP's as integers.
Anybody know of a way to make MySQL either do the bit logic on the string or convert/cast the string as an integer? Thanks. -- Chris Wagner CBTS GE Aircraft Engines [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]