Hi,
I am trying to display a list of products ordered using php and mysql.
I want to be able to display a list of all product orders but not each individual product.
I am retrieving data from more than one table.
Can I do this by using DISTINCT? if so, how?
Thanks
SQL DISTINCT
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
A better way of describing what I am trying to do is:
Can i use DISTINCT as follows -
I want to select all fields but use distinct on just one of those fields.
Can i use DISTINCT as follows -
Code: Select all
"SELECT * DICSTINCT product_id";