I have a table where i insert records of sales what i want to do is to make a ranking to see who is the person who sales more things.
The problem is that i can't use order by because i want to sort the results once i have colected the data with a sql query.
Because i build the query like this:
select * from sales where saler = $saler_id and product like $product_id
so i can't sort that in the query.
Any idea?
Thanks