Mysql语法错误#1064 - 您的SQL语法出错;查看与MySQL服务器版本对应的手册

时间:2015-03-13 06:22:46

标签: mysql sql

看看我的查询有一个语法错误:

SELECT min(t.`status`) ,
 t.`moddate`,case @rownum when 1 then
  @rowdate := @rowdate
  @rownum+1
  else
 @rowdate := ((@rowdate + INTERVAL @timediff SECOND) - INTERVAL @timediff SECOND) 
 end
FROM (SELECT `status`,`moddate` 
   FROM `globstats_graph`
   WHERE Cname='Cpmtree' AND IP='69.64.83.236'
   AND Port='3306' AND Variable='TABLE_LOCKS_IMMEDIATE'
   AND moddate between '2015-01-01 00:00' and '2015-02-01 00:00') t
,(
SELECT @rowdate :='2015-01-01 00:00',SELECT @timediff :=ROUND((TIMESTAMPDIFF(SECOND,'2015-01-01 00:00','2015-02-01 00:00')/90)),@rownum:=1
) AS r, GROUP BY case @rownum when 1 then
  @rowdate := @rowdate
  @rownum+1
  else
 @rowdate := ((@rowdate + INTERVAL @timediff SECOND) - INTERVAL @timediff SECOND) 
 end

你能不能请任何人建议我出了什么问题。

0 个答案:

没有答案