I have four fields that I am displaying. So when I do a select query I am selecting fields based on their relevance to a search peformed on the data within the fields. I am displaying an image which is a field with the image url. A name field which is the name of the product, and becomes a link for the actual page url which is in a seperate field. Then I am displaying the description, and price. These fields are all contained in a row along with the id field.
So the fields look like: id, name, desci, price, imageurl, url
Each row has those fields. In every row no matter what the url and id field will always be unique. However the name, desci, and price fields sometimes will have multiple instances. So I may have 10 rows with the same name desci and price, but each has a different id, and different url. Even the url is very similar, but still different.
Using the distinct keyword I have been able to eliminate the rows with the same data, but when I select and fill php variables with the row data from the select query results the variables will not hold the correct information.
I display all other fields besides the id.