I have two tables: messages (messages users posted), likes (many to many relationship between users and messages - it says that user1 likes message5).
messages
---------
id, id_user, message, created_at
likes
-----
id_user, id_message, created_at
If I send message, it goes to the messages table. If I like somebody's message, a new record will be created in likes table (is_user=me, id_message=message that I like).
The problem is, I would like to show history of my actions = messages and likes together in one list ordered by "created_at".
Something like:
- 1/1/2010 i sent message "aaa"
- 2/1/2010 i sent message "bbb"
- 3/1/2010 i liked somebodys's message "ccc"
- 4/1/2010 i send message "ddd"
EDIT And what's more, I want to also show details of the status I liked:
- 3/1/2010 i liked somebodys's message **"ccc"**
How to do that?