Keith D Kaiser
Keith D Kaiser

Reputation: 1036

phpMyAdmin explanation of errors

In v4.5.5.1 of phpMyAdmin I'm running the following MySQL code;

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

It runs just fine and returns everything I need but... I get three errors on line 3 at 'FROM (SELECT logdate'

Three errors

I also get five errors at line 23 'GROUP BY Month, netID WITH ROLLUP ) AS t'...

Five errors

What do these mean and should I resolve them and of course how do I resolve them?

Upvotes: 0

Views: 41

Answers (1)

Martin
Martin

Reputation: 22760

You state:

In v4.5.5.1

PHPMyAdmin current version is 4.7.7, you can get it here.

I have run your query in my version of 4.7.3 and this doesn't show these errors when run.

The issue is that you version of 4.5.5 was released in 2015 and so is pretty old... bugs get fixed, codes get improved, PHPMyAdmin has always trailed a little with dealing with advanced SQL syntax checking.

I would second the comment stated by tadman that

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

Upvotes: 2

Related Questions