Database design for the message function

Well, There is no relation between the topic and Yii.

It’s a database design only.

User A wants to send user B a message.

How will u design the table?

How many tables will u divide.

For me

It could be

t_message (id, from_id, to_id, title, content, created_at)

t_message_thread(id, message_id, content, user_id, created_at)

Any better solution?

this topic do nothing with yii :lol:

please refer this link

Please check an attached file for mysql dump which i am using for a internal messaging. i have used this mysql dump in my lots of projects.and this schema is working fine.

I am also working to develop a extension in yii for internal messaging. :)

awesome, all in one table :)