I need help with some SQL:
I have two databases:
bbTopic
bbTopicKey
bbtopic.bbTopic
bbTopicDescription
bbStatus (this tells if the Topic is viewable or not)
bbOrder
bbMain
bbKey
bbTopicKey
bbDate
I need to be able to show bbTopic.bbTopic with the date of the last message
bbDate.Date
Right now I am using this to show Topics:
SELECT bbmain.bbDate,
bbtopic.bbTopic,
bbtopic.bbOrder
FROM bbmain
INNER JOIN bbtopic ON (bbmain.bbTopicKey = bbtopic.bbTopicKey)
ORDER BY bbtopic.bbOrder, bbmain.bbDate DESC
I get this
Topic Last Post
Cars 05-25-04
Cars 04-25-04
Trucks 05-23-04
Trucks 05-01-04
Trucks 05-01-04
I nned to show only the lastest date
Topic Last Post
Cars 05-25-04
Trucks 05-23-04
Thanks