Hi
i have a table 'forum' with
id - topic - user - datum - comment
What i want is a table with only the max date with the corresponding user grouped by the topics
so i can set the last message was post on ... by ...
i found the solution in SQL:
SELECT topic, user, datum
FROM forum t1
WHERE datum = (
SELECT MAX( datum )
FROM forum
WHERE topic = t1.topic
)
But this give a Syntax error in MySQL
Can someone convert it?
Or does anyone know the solution?
Thx,
i have a table 'forum' with
id - topic - user - datum - comment
What i want is a table with only the max date with the corresponding user grouped by the topics
so i can set the last message was post on ... by ...
i found the solution in SQL:
SELECT topic, user, datum
FROM forum t1
WHERE datum = (
SELECT MAX( datum )
FROM forum
WHERE topic = t1.topic
)
But this give a Syntax error in MySQL
Can someone convert it?
Or does anyone know the solution?
Thx,