Thanks to all for the suggestions!!

Turns out, if I use a regular expression instead of a text compare I get the desired 
result!! :)

Thanks!
Erica

Gerald Clark wrote:

> 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
> > [EMAIL PROTECTED]
> > 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 <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> --
> Gerald L. Clark
> [EMAIL PROTECTED]

--
Erica B. Tanner
Naval Surface Warfare Center, Dahlgren Division
Advanced Computation Technology Group
[EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to