On Tuesday, April 17, 2001, at 12:19  PM, Mark Maggelet wrote:

> That works for mysql. He probably just wants to kill the duplicates,
> so there's an easier way: add a unique index to the phone_number
> field.
>
> alter ignore table $table add unique (phone_number);

Yep, that will prevent duplicate phone numbers from being inserted into 
the table.

Note that if there is existing data in the table, he'll have to remove 
the duplicates before making the phone_number field unique.

Cheers,

colin
-----------------------------------------------------------------
Colin Putney                    Whistler.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to