I want to make a website that users can register for classes. the rule is that one user can't register in one class that is concurrent with registered classes. how can I implement it? Is is solvable in query? or php code?
1条回答 默认 最新
dpy87530 2018-01-24 22:29关注You can solve this problem using PHP and a query to your database. You will query the database to retrieve a list of Date-times for each registered course for that user.
Once you have the list, you can use PHP code to check if the time and day for the course the user is attempting to register for falls between any of the times in the list from the database.
解决 无用评论 打赏 举报