-2

我认为以下是我搜索在 10 分钟时间范围内拨打的所有电话的方式

SELECT * FROM `call_log` WHERE start_time BETWEEN ('2012-05-01 17:50:00' AND '2013-05-01 18:00:00')

但是,当我运行此查询时,出现以下错误

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 30' at line 2

我不确定这目前意味着什么。日期格式也与上述相同。y-m-d h:m:s

4

2 回答 2

1

您不需要括号:

SELECT * FROM `call_log` 
WHERE 
start_time BETWEEN '2012-05-01 17:50:00' AND '2013-05-01 18:00:00'
于 2013-05-06T01:02:47.790 回答
0

下面是围绕这些类型的查询和函数的 MySQL 链接。正如有人指出(并击败我),你不需要括号......

http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html

于 2013-05-06T01:08:18.703 回答