Forum Moderators: open
MySQL version 4.0.23-standard
I want to retrieve results from my db that will not be duplicated in an instance of 2> matching results to the query.
My queryString will find all products matching the query, but in some instances there might be duplicate entries for a particular product. How I would identify this would be to check that only one instance of the product_id would be returned.
I had a look at distinct but not sure on how to complete the query to get all columns back from the db.
SELECT DISTINCT colum_product_id
FROM my_product_table
WHERE column_color = 'queryString'
(I think, please correct me if I am wrong)This would return all products that matches my queryString and only one instance of the product_id, so if I had many similar products with same colors I would only be shown one. But with this query I am only getting the product_id back with the query yeah? What would my query look like if I wanted the above query done but with other columns also returned so that my view has all details required?
TIA,
-george
PS - Again thanks for the replies to my last post, the suggestion works well...