From: Lo?c C. <lo...@us...> - 2001-06-15 21:06:00
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib In directory usw-pr-cvs1:/tmp/cvs-serv32401/chat/lib Modified Files: connected_users.lib.php3 Log Message: Add all the columns for GROUP BY Index: connected_users.lib.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/connected_users.lib.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** connected_users.lib.php3 2001/06/10 15:15:17 1.3 --- connected_users.lib.php3 2001/06/15 21:05:57 1.4 *************** *** 68,72 **** if ($isFullList) { ! $query = 'SELECT u.username AS nicks, u.latin1 FROM ' . C_USR_TBL . ' u, ' . C_ROOM_TBL . ' r WHERE u.room = r.room_name AND r.room_type = 1 GROUP BY nicks'; } else --- 68,79 ---- if ($isFullList) { ! if (C_DB_TYPE == 'mysql' || C_DB_TYPE == 'pgsql') ! { ! $query = 'SELECT u.username AS nicks, u.latin1 FROM ' . C_USR_TBL . ' u, ' . C_ROOM_TBL . ' r WHERE u.room = r.room_name AND r.room_type = 1 GROUP BY nicks'; ! } ! else ! { ! $query = 'SELECT u.username, u.latin1 FROM ' . C_USR_TBL . ' u, ' . C_ROOM_TBL . ' r WHERE u.room = r.room_name AND r.room_type = 1 GROUP BY u.username, u.latin1'; ! } } else |