English 中文(简体)
• 如何在MySQL数据库中代表“经常性活动”?
原标题:How to represent “Recurring Events” in MySQL database?

我会开发一个应用程序,使网站行政能够安排“活动”,使参观者能够保留或预订活动地点。

为了尽量减少行政工作,我需要允许行政部设定一个事件,并按时间表标明事件。 在大多数情况下,“每周”,但“每两周”“每月”等也可能在某个时候需要。

我正在把自己cra的摇.推向外(许多谷歌和安插;SO搜索已经进行),如何在MySQL中加以效仿。

我的理解是,我需要将“排入”项目分开,然后在需要时只增加“排入”项目(即:第一手图书的位置、到达的日期、案例与系列独立编辑等)。

我似乎无法把此事实际记录在数据库中,而不必感到nas。 谁能向我指出正确的方向?

最佳回答

I d been thinking about something similar wrt a hobby project.

我的结论是,如果在答复提问时把经常性事件合并起来,则比较容易维持一个单独排定事件表(情况)和重复事件表(即不把事件表与经常性事件的记录相加)。

这也意味着,你将执行质疑性预报,要求有开始和结束时间要求(或了解经常性事件和事件)。

And to simplify handling the case where e.g. a recurring event is scheduled for each week, then to put the exception in the instance table.

考虑——如果你为经常性事件制造事例的话——有人每周安排一次没有结束日期的活动。 有多少记录在表格中? 你们如何察觉他们何时出走? 你如何处理业主取消时间表的情况?

了解理论/理论。

您也不妨研究如何通过诸如“Sandercalendar”等申请来处理这一问题。

问题回答

暂无回答




相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

php return a specific row from query

Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...

Character Encodings in PHP and MySQL

Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...

Pagination Strategies for Complex (slow) Datasets

What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...

Averaging a total in mySQL

My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...

热门标签