douxian7117
douxian7117
2014-04-19 14:36

PHP MySQL图像表

已采纳

what is the best way to construct an image table in which each user has his own photo album. what I did so far is create a user table with id, username, name etc. fields. I am confused how to construct the image table which will contain all the photos of the users.

any suggestions

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • douza19870617 douza19870617 7年前
    CREATE TABLE user_images (
        id INT AUTO_INCREMENT,
        user_id INT REFERENCES user (id),
        image_name VARCHAR(30) NOT NULL,
        image_data BLOB
    );
    
    点赞 评论 复制链接分享

相关推荐