List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:May 1 2001 2:37pm
Subject:Re: Empty Set Query question
View as plain text  
You are doing a text compare, and they have to match exactly,
including leading zeros after the dots.

You might look at storing them as integers. MySQL has to functions
INET_ATON() and INET_NTOA() to convert them back and forth to strings.

Erica B. Tanner wrote:

> Hello everyone.  I am new to this list and hope it's the right one for
> my question.  This may be really obvious, but I can't seem to figure it
> here's the problem:
> I have a table that stores network incident report information, IP
> address, dates, type of incident, report name, etc.  I am trying to
> query the table for a specific ip address that's in the "source_ip"
> field.  I can see that the record is there when I query all of the
> records, but when I query for one specific ip, I get the empty set
> result! :(
> Here is my query
> select * from IDReport where source_ip="";
> The field type is char(16).  Any ideas why mysql is not finding that
> record??
> I appreciate ANY help on this matter!!! :)
> Thanks,
> Erica
> --
> Erica B. Tanner
> Naval Surface Warfare Center, Dahlgren Division
> Advanced Computation Technology Group
> TannerEB@stripped
> 540.653.5796
> ---------------------------------------------------------------------
> Before posting, please check:
>   (the manual)
>           (the list archive)
> To request this thread, e-mail <mysql-thread72780@stripped>
> To unsubscribe, e-mail
> <>
> Trouble unsubscribing? Try:

Gerald L. Clark

Empty Set Query questionErica B. Tanner1 May
  • Re: Empty Set Query questionGerald Clark1 May
  • Re: Empty Set Query questionErica B. Tanner1 May