Re: Finding Duplicate Numbers?
| From: | Colin Putney | Date: | Tue, 17 Apr 2001 19:34:27 +0000 |
| Subject: | Re: Finding Duplicate Numbers? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49031@lists.php.net to get a copy of this message | ||
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