dougu1896 2014-06-16 11:41
浏览 15
已采纳

电子邮件发件人在PHP / MySQL中

I am trying to build an email sender in PHP/MySQL where you can choose the group of people (in dropdown menu) and send them a message. I have a {users} table with emails and I am having trouble figuring out how to do groups table.

What columns should I have? or Any other way to do the same thing?

I would be really grateful if you could explain like you would to a beginner :)

Thank you)

  • 写回答

1条回答 默认 最新

  • douchenzhan3050 2014-06-16 11:47
    关注

    You're looking for a many-to-many relationship, which will look something like this (three tables):

    group

    id
    name
    

    user_groups

    id
    user_id
    group_id
    

    users

    id
    name
    email
    

    Whenever a user is added to a group, you will insert a row into the user_groups table.

    Have a read on Database Normalization.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 关于#python#的问题:自动化测试