- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试创建事件计划,但 phpmyadmin 在左侧显示错误“无法识别的语句类型。 (靠近时间表)'。 MySql 版本是 10.1.8。我真的不明白这段代码或 MySql/phpmyadmin 或任何其他配置有什么问题。
DELIMITER $$
CREATE
EVENT `archive_blogs`
ON SCHEDULE
EVERY 1 DAY
STARTS '20:00:00' ON COMPLETION PRESERVE ENABLE
DO BEGIN
.....
END */$$
DELIMITER ;
捕捉错误:无法识别的语句类型。 (靠近时间表)
最佳答案
MySql version is 10.1.8
你确定是MySQL吗?可能是 MariaDB?你在哪里得到这个错误 - 脚本,phpMyAdmin?您是否尝试从控制台执行它?
至于
STARTS '20:00:00'
试试下面的方法
STARTS CONCAT(DATE(NOW()+INTERVAL 1 DAY ), ' 20:00:00')
来自 MySQL 文档:
To repeat actions at a regular interval, use an EVERY clause. The EVERY keyword is followed by an interval as described in the previous discussion of the AT keyword. (+ INTERVAL is not used with EVERY.) For example, EVERY 6 WEEK means “every six weeks”.
Although + INTERVAL clauses are not permitted in an EVERY clause, you can use the same complex time units permitted in a + INTERVAL.
An EVERY clause may contain an optional STARTS clause. STARTS is followed by a timestamp value that indicates when the action should begin repeating, and may also use + INTERVAL interval to specify an amount of time “from now”. For example, EVERY 3 MONTH STARTS CURRENT_TIMESTAMP + INTERVAL 1 WEEK means “every three months, beginning one week from now”. Similarly, you can express “every two weeks, beginning six hours and fifteen minutes from now” as EVERY 2 WEEK STARTS CURRENT_TIMESTAMP + INTERVAL '6:15' HOUR_MINUTE. Not specifying STARTS is the same as using STARTS CURRENT_TIMESTAMP—that is, the action specified for the event begins repeating immediately upon creation of the event.
An EVERY clause may contain an optional ENDS clause. The ENDS keyword is followed by a timestamp value that tells MySQL when the event should stop repeating. You may also use + INTERVAL interval with ENDS; for instance, EVERY 12 HOUR STARTS CURRENT_TIMESTAMP + INTERVAL 30 MINUTE ENDS CURRENT_TIMESTAMP + INTERVAL 4 WEEK is equivalent to “every twelve hours, beginning thirty minutes from now, and ending four weeks from now”. Not using ENDS means that the event continues executing indefinitely.
ENDS supports the same syntax for complex time units as STARTS does.
You may use STARTS, ENDS, both, or neither in an EVERY clause.
关于mysql:无法识别的语句类型。 (靠近 SCHEDULE)当尝试创建事件时间表时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33866093/
我有以下格式的一些数据: 薪水 代码及时 1690 09:03:00 1690 09:13:00 1690 09:07:00 1691 08:48:00 1691 08:52:00 1691 08:5
在基于 jsp 和 servelet 的 Web 应用程序中实现类似 cron 的调度程序的最佳方法是什么?使用“定时器服务”遇到了一个选项。任何其他替代方案或对计时器服务的任何评论? 提前致谢 沙米
好吧,我对 MySQL 和数据库总体来说还很陌生。我想在一段时间后对数据库进行更新。让我解释一下。 所以为了练习,我正在用 php 构建一个游戏,在这个游戏中你将能够升级东西。比如说一栋建筑,从1级升
我想为每个用户创建一个典型的学校时间表。 最终产品应如下所示: +----+---------+---------+-----------+----------+--------+ | h | Mo
我的表格: timetable +----+---------+-------+--------+---------+---------+------+ | id | user_id | s_day
我的网站涉及安排重复类(class)和事件。目前,我已经使用 php 和 javascript 构建了一个表,该表逐个时间段扫描我的 mysql 数据库,每天查看是否有安排的事件或时间段是否空闲。 它
我有一个关于日程安排的问题。我需要为约会制作一个时间表生成器。这是目前的情况。 P1 与 P2 有约会 A。 P3和P4有个约会B。 等等…… 预约 A 大约需要 15 分钟 B约需40分钟 (时长视
我有一个配置如下的 celery 时间表: CELERYBEAT_SCHEDULE = { "runs-every-30-seconds": { "task": "tasks.
我想在“每个月的最后一天 10:15”和“每个月的第一个星期日”运行 spring scheduler 作业 - 我在下面尝试过 - 但它在初始化 spring 上下文时出错: org.springf
如何在运行时检查 openmp 计划? 我使用并行循环和运行时计划编译我的代码 #pragma omp parallel for schedule(runtime) collapse(2) for(j
我已经制作了一个 Android 应用程序,并且它已成功编译,没有任何错误。但是当我在 Android 手机中运行应用程序时,它不会显示所需的输出。 这是我的 MainActivity.java: p
经过一天的痛苦,我终于将数据放入了日程安排事件中。 我现在尝试在单击事件时设置事件,它使用数据变量加载新页面。 这是 xhtml 还有 Java public void redirec
我正在使用 Primefaces Schedule 组件在我的网络应用程序中呈现事件。但我需要对他耍点小花招。对于每个呈现的事件,我需要显示一个包含事件详细信息的工具提示。使用 window.onlo
我想设置一个 crontab 表达式,每 20 分钟启动一次作业,并且它将按照时间表运行 周一至周五上午 7 点至 30 点至晚上 8 点,周六上午 7 点至 30 点至下午 4 点 到目前为止我有以
这是我根据用户输入创建表格的代码: const err = "the valid input is a number between 5 and 20, please refresh your pag
有没有办法在 HighCharts 中制作与此类似的时间线/时间表? https://developers.google.com/chart/interactive/docs/gallery/time
在关于 AES key 表的教程中,我看到 key 表的操作(旋转、rcon、s-box)应用于一个 4 字节的字。你能解释一下这个字从哪里来吗?我明白我从 128 位长的 key 中提取它。 key
SQL Server 作业/时间表 - 美国与英国夏令时调整 我们有一个基于英国的服务器,它需要在 16:30(美国中部时间 - 这可能看起来很奇怪,但这是因为一些数据的可用性)运行 SQL 代理作业
我有一个 quartz 作业,每天下午 3 点(服务器时间)运行。我想做的是让它在下午 3 点运行,但针对美国的每个时区。 quartz 作业会触发一封电子邮件给我的用户,我希望每个人都能在他们的时间
我想以一种非常简单的方式展示电视指南时间线,但我对此真的很陌生,所以我希望有人可以帮助我,我不想要太复杂的东西,而且我已经在网络上搜索并且我发现非常复杂的时间线,有很多我真的不需要的功能,我只想显示当
我是一名优秀的程序员,十分优秀!