List:General Discussion« Previous MessageNext Message »
From:Chris Knipe Date:May 22 2002 8:34pm
Subject:Re: columb structure
View as plain text  
And who said you ever get to old to learn :)

Never knew I could do unique indexes like this...... Definitely what I'm
looking for... Thanks guys :)

--
me

----- Original Message -----
From: "Ryan Hatch" <rhatch@stripped>
To: "Chris Knipe" <savage@stripped>; <mysql@stripped>
Sent: Wednesday, May 22, 2002 9:59 PM
Subject: Re: columb structure


> you're not making much sense to me
>
> in your first post... you wanted make sure every IP you have is unique,
correct?
>
> Do an ALTER TABLE  with "UNIQUE(octet1, octet2, octet3, octet4)".
>
> or am I not understanding your question?
>
> Regards,
>
> -Ryan Hatch
> * remember me? yesterday #php on DALNet, G3X7
>
>
> Chris Knipe wrote:
>
> > Multiple subnets :/
> >
> > columns like this:
> > octet1, octet2, octet3, octet4
> > 195,196,192,23
> > 232,196,231,11
> >
> > This would then be seen as a duplicate
> >
> > Kind Regards,
> >
> > Chris Knipe
> > MegaLAN Corporate InterNetworking Services
> > Tel: +27 21 854 7064
> > Cell: +27 72 434 7582
> >
> > ----- Original Message -----
> > From: "Myk Melez" <myk@stripped>
> > To: "Chris Knipe" <savage@stripped>
> > Cc: "mysql" <mysql@stripped>
> > Sent: Wednesday, May 22, 2002 8:43 PM
> > Subject: Re: columb structure
> >
> > > Chris Knipe wrote:
> > >
> > > >I'm currently storing them into varchar(16), although I've been
thinking
> > of
> > > >doing it as for smallint columns, but then I can't be 100% certain I
> > won't
> > > >get duplicates.....
> > > >
> > > Why not?  Just define a UNIQUE index across all four smallint columns,
> > > and MySQL will throw an error if you attempt to insert a duplicate
> > > record into the table.
> > >
> > > -myk
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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-thread109887@stripped>
> > To unsubscribe, e-mail
<mysql-unsubscribe-rhatch=hitech-inc.com@stripped>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

Thread
columb structureChris Knipe22 May
  • Re: columb structureMyk Melez22 May
  • Re: columb structureChris Knipe22 May
  • Re: columb structureRyan Hatch22 May
  • Re: columb structureChris Knipe22 May
  • Re: columb structureMyk Melez22 May