我想获取2个日期之间的数据,但它显示1064错误

时间:2016-04-15 12:16:52

标签: mysql mysql-workbench

我的mysql查询是

SELECT
  testid,  
  testName, 
  DATE(testviewaudit.datetime) ,
  SUM(action=1) AS view, 
  SUM(action=2) AS start, 
  SUM(action=3) AS finish 
FROM testviewaudit 
INNER JOIN tmtests 
ON estviewaudit.testid = tmtests.tsid  
WHERE DATE(testviewaudit.datetime) >= '2016-03-12' 
AND DATE(testviewaudit.datetime) <= '2016-03-15'
GROUP BY testid;

使用上面的查询我收到1064错误

1 个答案:

答案 0 :(得分:0)

您只需在查询之间使用

&#13;
&#13;
$thumb_id = get_post_thumbnail_id($single->ID);
$thumb_url = get_guid($thumb_id);
&#13;
&#13;
&#13;