Hi,

I have a slight problem. I am using a duplicate content filter and I now need to query and select each authors name from the table and then I need to use that name to query the table again to return all of the rows that include that authors name apart from the authors name that has the same id as the first queries result.

I need to do this so I can work through each authors name to see if they have submitted their articles 2 times, or have nearly duplicate articles on the database. I have so far put the following script together, but it doesn't seem to work.

It seems to be messing up on the while statements I believe in that it's giving the wrong results. I think the loops are done wrong or I should be using something else for the 1st queries loop.

PHP Code:
$sqlc mysql_query("SELECT
            description
            , ided
            , authname
             FROM 
             articlesl 
             WHERE 
             member=0
              AND
               app!=9
                limit 0 , 5"
);
                
$sqlcnum mysql_num_rows($sqlc);

while(
$sqlc2 mysql_fetch_array($sqlc))

    {

$str1 strip_tags($sqlc2[description]);

$sqla mysql_query("
            SELECT 
            description
            , ided
            , authname
             FROM 
             articlesl
              WHERE
               authname='
$sqlc2[authname]'
                AND ided!='
$sqlc2[ided]'
                 AND app!=9"
);
                 
while(
$sqla2 mysql_fetch_array($sqla))

    {

$str2 strip_tags($sqla2[description]);

similar_text($str1$str2$p);

$artpercent round($p);

if(
$artpercent 33)

    {
    
echo 
"Aut: $sqlc2[authname] 1st Art: $sqlc2[ided] Aut: $sqla2[authname] 2nd Art: $sqla2[ided] P: $artpercent%<br /><b>DESC 1:</b> $str1<br /><br /><b>DESC 2:</b> $str2<br />";

//mysql_query("DELETE FROM articlesled2 WHERE ided='$sqlc2[ided]'");

//mysql_query("DELETE FROM articlesled WHERE ided='$sqlc2[ided]'");

//mysql_query("DELETE FROM articlesl WHERE ided='$sqlc2[ided]'");

            
}
        }
    } 
Please help!

Thanks!