dongwuwan5646 2013-06-30 16:58
浏览 97
已采纳

在单个MYSQL单元格中插入多个值

Can anyone suggest me how can i store Multiple values in a single MySQL cell using Php? I am simply using the insert function but it is not helpfull at all.

  • 写回答

2条回答 默认 最新

  • douyi1855 2013-06-30 16:59
    关注

    No, no no, no, NO!

    Never store multiple values in a single cell. It will always get back to you. It is against the 3rd rule of DB normalization.

    Insert only single values in a cell and add multiple records if you must. Example

    photos table:          id  | filename
                           1   | 'myfoto.jpg'
    
    comments table:       photo_id | user_id  | comment
                          1        | 23       | 'great picture'
                          1        | 99       | 'nice'
                          1        | 7        | 'do not like it'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?