I'm looking to modify a search query I have that searches on a single field, but returns results from all fields. What I want to do, since duplicates exist under certain conditions, is eliminate the duplicates from displaying on the wildcard search.
Fields are Display, Link, Category, UniqueID
The wildcard is searching on the Link field using %domain% to pull in all data.
I'm using PHP to generate a URL. The duplicates can exist as the same URL can be entered with multiple Category field entries.
Right now my query looks like this:
I'm thinking that I can do something with either the Category or UniqueID fields, but the syntax is not coming to me when I think of how I should be writing it.
SELECT * FROM `mytable` WHERE `Link` LIKE '%domain%'");