Keyword

mod_k2_comments Query Correction (GROUP BY portion is being excluded)

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 3 months ago #78317 by Omar Ramos
I turned on debugging and found out that there is an issue with the mod_k2_comments helper.php file around line 110.The query there  uses a semi colon at the end of the first line of the query, effectively disconnecting the GROUP BY and ORDER BY clauses that are on the next line (those two are in limbo since they aren't part of any string variable).I just corrected it so that the query would be complete:$query = "SELECT COUNT(id) as counter, userName, userID, commentEmail ".                  "FROM #__k2_comments " .                  "WHERE userID > 0"." AND published = 1 " .                 "GROUP BY userID ORDER BY counter DESC";And the debug error went away.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum