How can I detect redundant rows in the table?

前端 未结 4 1087
梦谈多话
梦谈多话 2020-12-22 12:19

I\'m following solution #1 of this answer. After a while, there will be some redundant rows in the table. Suppose this table:

+------+------         


        
4条回答
  •  旧巷少年郎
    2020-12-22 13:04

    Create code that checks for the user already existing in the cookie table.

    If the user id exists in the user column - just update it with the new cookie information. If the user id doesn't exist, create a new record.

    Or you can check for existing records, delete them, and then insert the new one.

提交回复
热议问题