MySQL Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY p.prKey ORDER BY isPublished' at line 1 query=SELECT p.prKey, p.isPublished,gpName domain, gpKey , prName, u.usKey, usFirstName, usLastName, COUNT(d.prKey) connections, DATE_FORMAT(prDate, '%b %e, %y') prFormatDate FROM principle p, users u, groups grp LEFT JOIN connection d ON p.prKey = d.prKey WHERE grp.gpKey = p.prPubGrp AND p.prLevel != 3 AND p.prUser = u.usKey AND p.prPubGrp = GROUP BY p.prKey ORDER BY isPublished URL=/dp/managePrinciples.php?PHPSESSID=a806f3700b0e10dd74896084a80686ec