Search based on multiple fields
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 may have answered my own question, but I'll leave it up in case I am way off base.
If I use a GROUP BY and group it by Link, then it will only display each link in the resulting php output 1 time, thus eliminating my duplicates as only the URL shows in the output, not the Category or UniqueID fields.
|All times are GMT +1. The time now is 11:48 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.