Fixed "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause"
authorDan
Mon, 11 May 2009 08:53:10 -0400
changeset 20 5a359c7ebc48
parent 19 3a791f3f4b91
child 21 f34ecfa459ab
Fixed "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause"
plugins/yubikey/corelib.php
--- a/plugins/yubikey/corelib.php	Mon May 11 08:50:37 2009 -0400
+++ b/plugins/yubikey/corelib.php	Mon May 11 08:53:10 2009 -0400
@@ -234,7 +234,7 @@
   $yk_enabled = 0;
   if ( $session->user_logged_in )
   {
-    $q = $db->sql_query('SELECT COUNT(y.yubi_uid) > 0, u.user_yubikey_flags FROM ' . table_prefix . "yubikey AS y LEFT JOIN " . table_prefix . "users AS u ON ( u.user_id = y.user_id ) WHERE y.user_id = {$session->user_id};");
+    $q = $db->sql_query('SELECT COUNT(y.yubi_uid) > 0, u.user_yubikey_flags FROM ' . table_prefix . "yubikey AS y LEFT JOIN " . table_prefix . "users AS u ON ( u.user_id = y.user_id ) WHERE y.user_id = {$session->user_id} GROUP BY u.user_id, u.user_yubikey_flags;");
     if ( !$q )
       $db->_die();