Re: How to store a chat in a mysql db
Date: Wed, 20 Mar 2019 12:37:08 +0100
Message-ID: <q6t8l3$1rfg$1_at_gioia.aioe.org>
[Quoted] Thank you for your reply! :)
> The handler is the name of the user, the user_id is really just the id
> column of the chat_user table.
[Quoted] Ok, it's what I understood!
> I think a better design had to be using a better name for the id columns
> in each table, like use user_id even in the chat_user table, chat_id for
> the chat table and so on, this makes it less likely that you make bad
> joins or confuse things.
[Quoted] Yes of course but sometimes when you find examples of the code on internet it's now always so clear!
Now I should add a chatlog's table to store every chat of every users [Quoted] also is the user will delete himself, I don't understand if it's better to do a sql script to copy chat to the chatlog's table or if it could be more "nice" to create a table with FK...
^Bart Received on Wed Mar 20 2019 - 12:37:08 CET