Code: Select all
$result = mysql_query ("SELECT id, categories, titletag, metadescription, metakeywords FROM categories WHERE titletag = '' OR titletag IS NULL OR metadescription = '' OR metadescription IS NULL OR metakeywords = '' OR metakeywords IS NULL");But I now need to show if the information in these fields are duplicates... and of what they are duplicates.
ie. If Category "Shirts" has the same Meta Description as "Polo Shirts", it needs to flag it up.
I could easily just extract the lot, and then query each line in a separate query... and show. But then it would be doing more work than needed, as it would show each category, even if there are no duplicates.
(this will be done for products too... so you can see my problem).
Can it all be done within one query?