A while back I began using the following SQL query to compare the fields of a Product database to the same fields in the same database, looking for exact matches.
SELECT *, a.ID from $Product_DB as a, $Product_DB as b where a.ProdDesc = b.ProdDesc and a.ID != b.ID AND a.ID > b.ID order by a.ProdDesc, b.ProdDesc
It works fine and displays entries that have duplicates, BUT my issue is that it only returns one of them for PHP to display.
Basically, the script returns "here are the products that have duplicate entries in your database" Which leaves me to search the database using a second query, which takes time and extra coding.
But, I want it to say "here is product 1, which matches product 25, and here is product 28 that matches 168."