Hey there, I'm trying to do something quite hard to explain, so I'll add a picture too

So, what I want to do is select from a sql table the new entries of the day. This is pretty easy even for a noob like me. Though, those entries have a column called 'categorie' and if there is more than one new entry with the same categorie, it'd select only the last one.
I think facebook uses something like this on the private messages panel. The first message must have a secundary ID number that is passed to the replies.

The solution may be inside the loop, but the sql command would be something like:
Code: 
SELECT id, date, categorie, txt FROM products WHERE [categorie does not repeat] AND DATE=$date ORDER BY date DSC;
And here's the image:


If you could give me a hand, I'd be really grateful.
Cheers
Solutho Reviewed by Solutho on . [help] Select Distinct - sql Hey there, I'm trying to do something quite hard to explain, so I'll add a picture too :D So, what I want to do is select from a sql table the new entries of the day. This is pretty easy even for a noob like me. Though, those entries have a column called 'categorie' and if there is more than one new entry with the same categorie, it'd select only the last one. I think facebook uses something like this on the private messages panel. The first message must have a secundary ID number that is Rating: 5