Hi,
I don´t know any more how to solve my problem.
I have a ticketsystem where each ticket belongs to an user and each user can insert a couple of messages to one ticket. Therefore I have implemented a date field (used as primary key).
Now I want to get details from the last entry belongs to a ticketid.
kdn_message:
updated (date)
ticketid (int)
kdnr (int)
detail
state
select * from kdn_message t
where updated in (select max(updated) as updated from kdn_message group by ticketid where ticketid=t.ticketid order by updated desc)
what is wrong i this statement?
using: MySQL 4.0.22
I don´t know any more how to solve my problem.
I have a ticketsystem where each ticket belongs to an user and each user can insert a couple of messages to one ticket. Therefore I have implemented a date field (used as primary key).
Now I want to get details from the last entry belongs to a ticketid.
kdn_message:
updated (date)
ticketid (int)
kdnr (int)
detail
state
select * from kdn_message t
where updated in (select max(updated) as updated from kdn_message group by ticketid where ticketid=t.ticketid order by updated desc)
what is wrong i this statement?
using: MySQL 4.0.22