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
> out...so 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="xxx.xxx.xxx.xxx";
> 
> 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:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread72780@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

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