here is my query:
$result=mysql_query("SELECT *, (people.ID) AS peopleid FROM people
LEFT JOIN sales_history ON people.ID=sales_history.User_ID
WHERE sales_history.Prod_ID=$_REQUEST[prodid] ");
The query runs fine in that it doesnt give me errors, however there are only 2 people in the database.
hugh has bought 5 items
Steve hasbought 3.
when i run the query it returns 5 instances of Hugh and 3 of Steve, i want it to return only one of each person.
any ideas how i would go about this in the QUERY.
Thanks,
nozom