gpt4 book ai didi

mysql - phpMyAdmin 错误解释

转载 作者:行者123 更新时间:2023-11-29 06:49:02 24 4
gpt4 key购买 nike

在 phpMyAdmin v4.5.5.1 中,我运行以下 MySQL 代码;

SELECT Date, DOW, Week, Year, logdate, Month, monum, netID, Logins, 
creds, newb, netCnt, TOD, netCnt, activity
FROM (SELECT logdate
,activity
,DATE( logdate ) AS Date
,DAYOFWEEK( logdate ) AS DOW
,WEEK( logdate,0 ) AS Week
,YEAR( logdate ) AS Year
,DATE_FORMAT( logdate, '%M' ) AS Month
,DATE_FORMAT( logdate, '%m' ) AS monum
,CONVERT( netID,UNSIGNED INTEGER ) AS netID
,COUNT( callsign ) AS Logins
,COUNT( IF(creds <> '',1,NULL) ) AS creds
,COUNT( IF(comments LIKE '%first log in%',1,NULL) ) AS newb
,count( DISTINCT netID ) AS netCnt
,SUM( DISTINCT netID) AS allCnt
,SEC_TO_TIME( SUM(timeonduty) ) AS TOD
FROM NetLog
WHERE netID <> 0
AND activity NOT LIKE '%TEST%'
AND netcall LIKE '%W0KCN%'
AND substr(logdate,1,4) = 2017
GROUP BY Month, netID WITH ROLLUP ) AS t
ORDER BY t.logdate , logins

它运行得很好并返回我需要的一切,但是......我在第 3 行的 'FROM (SELECT logdate'

Three errors

我还在第 23 行“GROUP BY Month, netID WITH ROLLUP ) AS t”处遇到了五个错误...

Five errors

这些是什么意思,我应该解决它们,当然我该如何解决它们?

最佳答案

您声明:

In v4.5.5.1

PHPMyAdmin当前版本是4.7.7,you can get it here

我已在 4.7.3 版本中运行您的查询,运行时不会显示这些错误。

问题是你的 4.5.5 版本是在 2015 年发布的,所以已经很老了......错误得到修复,代码得到改进,PHPMyAdmin 在处理高级 SQL 语法检查方面总是落后一些。

我会附议评论stated by tadman那个

phpMyAdmin is not as robust a tool as something like MySQL Workbench so if you have the option of using Workbench

关于mysql - phpMyAdmin 错误解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48232069/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com