Simply create a UNIQUE Index on the column to avoid duplicates.

That will be case insensitive, and trailing spaces AFAIK, but spaces inside
the columns text have significance.

HTH,
Tore.

----- Original Message -----
From: "Dee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 02, 2003 9:33 PM
Subject: Duplicate


> Hi,
>
> I am still learning MySQL and trying to find certain things I use to do
> in Access.  I having been looking and can not find an way to set a field
> so that it can not be duplicated.  Since I can not find that I tryed
> looking for the record using SELECT and WHERE but doing an IF on the
> result of the QUERY does not help.
>
> Does anyone know how I can check for a duplicate in a database before
> adding a record.  I am checking a text field for duplicate entry.  Which
> means that I have to ignore case and spacing.
>
> Thanks for any help.
>
> Dee
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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