Comment system for news

1

I am developing a web page with MySQL and PHP, I have a news section where each one can receive comments. These comments can also be a response to another comment. For this I use a table in the database with the following structure

Create table comentario
(
   id int not null,
   id_comentario_padre int,
   texto varchar(255),
   fecha datetime,
   verificado tinyint
)

Now, as you will see I am not storing a nickname or something like that for the author because the problem I have is that sometimes the author will be a registered user (in which case he should store his id) and in other cases the author It will be a visitor not logged in who can enter an alias for that comment. I was hoping that you could help me with the design of the comment table and how to deal with this duplicity in the possible values of the nickname column

    
asked by Agustin Zamar 08.11.2018 в 04:42
source

0 answers