There is a table for user comments, I create it as shown below. It is necessary that the comment id and id of the person who sent the comment do not repeat, actually make them unique, but comment id are still assigned in order (1, 2, 3, 4 ... n) ignoring uniqueness for the user, what's the problem?
CREATE TABLE comments( id_comment MEDIUMINT NOT NULL AUTO_INCREMENT, id_user INTEGER NOT NULL, id_send_user integer NOT NULL, author CHAR(32) NOT NULL, date CHAR(18) NOT NULL, message TEXT NOT NULL, img CHAR(50) NOT NULL, PRIMARY KEY (id_user,id_comment) ) ENGINE=MyISAM;
It seems to have solved the problem until everything works, replaced PRIMARY KEY
( id_user,id_comment
) with PRIMARY KEY
( id_send_user,id_comment
)