How do you make a private conversation list table in a database ?
This is how I think I will do this
I will create a new table named chat with
1.id autoincrement (KEY PRIMARY)
2.id_m1 - the identity of first participant from members table (KEY PRIMARY)
3.id_m2 - the identity of second participant from members table (KEY PRIMARY)
4. created_at - row timestamp
....
problem is that member A AND B can have two diferent ids
234 AB
564 BA
It might be a bit confusing , I could try to search for the Table before to get the autoincrement id if the conversation started allready and initiated from user A ?
How did you do it ? Is my practice corect ?
Thanks
This is how I think I will do this
I will create a new table named chat with
1.id autoincrement (KEY PRIMARY)
2.id_m1 - the identity of first participant from members table (KEY PRIMARY)
3.id_m2 - the identity of second participant from members table (KEY PRIMARY)
4. created_at - row timestamp
....
problem is that member A AND B can have two diferent ids
234 AB
564 BA
It might be a bit confusing , I could try to search for the Table before to get the autoincrement id if the conversation started allready and initiated from user A ?
How did you do it ? Is my practice corect ?
Thanks