如何停止重复的记录

问题描述:

我正在制作一个事件管理系统....
我希望每天只能预订3个活动,最多不超过3个
我不知道该怎么做
任何帮助将不胜感激.

I am making a event management system....
I want only 3 events can be booked per day not more than 3
I do not know how to do this
any help will be appreciated

在插入新记录之前,请对存储事件的表运行查询并计算已经存在的事件数.如果已经有3个,则根本不允许用户继续添加新记录.
Before you insert a new record, run a query against your table where you store the events and count how many already exist. If there are already 3, then simply don''t allow a user to continue adding new records.