douzhi3454 2019-04-20 10:30
浏览 123

如何在日历中选择一个日期,任何其他患者都无法使用php数据库选择该日期?

I am setting up a date and time calendar in the phpmyadmin database to select an appointment date by the patients but once one date is selected it can not be selected again. How can I do this in phphmyadmin and connect it with the database?

         <h5> Date: </h5>
           <input type="datetime-local"/><br>
         </form>
     </div>
     </div>
  • 写回答

1条回答 默认 最新

  • dongtan6543 2019-04-20 10:49
    关注

    I would create a table with valid options. Let's say you can have patients between 9.00 am and 5.00 pm. A patient can book 30 mins appointments, therefore you need 30 mins intervals.

    I'd call my table PossibleAppointments:

    =================
    =  id  =  time  =
    =================
    -   1  -  9:00  -
    -----------------
    -   2  -  9:30  -
    -----------------
    -      ...      -
    -----------------
    -   #  -  4:30  -
    -----------------
    

    Add another table called BookedAppointments, where you have an entry, such as:

    ================================
    =  id  =      date    =  time  =
    ================================
    -   #  -  2019-04-22  -    2   -
    --------------------------------
    

    Note that the column time would represent the id of one row of PossibleAppointments.

    Now, whenever a patient wants to book an appointment, display a dropdown input and filter out already booked appointments based on your tables.

    评论

报告相同问题?

悬赏问题

  • ¥15 echarts动画效果失效的问题。官网下载的例子。
  • ¥60 许可证msc licensing软件报错显示已有相同版本软件,但是下一步显示无法读取日志目录。
  • ¥15 Attention is all you need 的代码运行
  • ¥15 一个服务器已经有一个系统了如果用usb再装一个系统,原来的系统会被覆盖掉吗
  • ¥15 使用esm_msa1_t12_100M_UR50S蛋白质语言模型进行零样本预测时,终端显示出了sequence handled的进度条,但是并不出结果就自动终止回到命令提示行了是怎么回事:
  • ¥15 前置放大电路与功率放大电路相连放大倍数出现问题
  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加