Hm...it's not fast, but it should work.

Do a select statement to take out just the phone numbers, then do something
like:

while ($row = mysql_fetch_row($result))
{
    $array[] = $row[0];
}

$amount = array_count_values($array);

$imax = sizeof($amount);
for ($i = 0; $i < $imax; $i++)
{
    if ($amount[$i] > 1)
        {
            $copys[] = $amount[$i];
        }
}


It ain't pretty, but $copys will be an array filled with the phone numbers
that were entered more than once, so you can do whatever you want with it
other than that.


--
Plutarck
Should be working on something...
...but forgot what it was.


""Devin Atencio"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I have a SQL Table that has over 1,000 records and I was wanting
> to write a script that would find duplicate phone numbers and
> then list the duplicate phone numbers. I have been trying to
> think on how to do this but I can't think of a way. Can someone
> please help me on some code I could write to do this?
>
> Thanks in advance.
>
>                                                /'^'\
>                                               ( o o )
> ------------------------------------------oOOO--(_)--OOOo----
>     Devin Atencio
>     ArosNet Systems Administration         .oooO
>     EMail: [EMAIL PROTECTED]               (   )   Oooo.
> --------------------------------------------\ (----(   )-----
>                                              \_)    ) /
>                                                    (_/
>
>
> --
> 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]
>



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