Well basically, what I want is this:
select distinct ip, id, product, file, timestamp from useronline order by id desc...
Doind this, I will get duplicate results from IP. distnct is ignored..
example:
----IP------ ---PRORDUCT---
192.168.1.115 bannana
192.168.1.115 apple
192.168.1.110 pear
192.168.1.110 orange
LEts say, I want to get distinct result from IP.. only show one ip of both, and those results ordered by alphabetic asc:
I should get only this rows :
192.168.1.110 apple
192.168.1.115 orange
I already tried this:
select ip, id, product, file, timestamp
from useronline
group By IP
order By ID DESC
Any Ideas ???