PostgreSQL: fixed Admin:SecurityLog database error
authorDan
Sun, 06 Dec 2009 18:22:02 -0500
changeset 1146 4a90e6e46937
parent 1145 21ef2f8feb59
child 1147 7ddd475bc661
PostgreSQL: fixed Admin:SecurityLog database error
plugins/admin/SecurityLog.php
--- a/plugins/admin/SecurityLog.php	Tue Dec 01 11:15:45 2009 -0500
+++ b/plugins/admin/SecurityLog.php	Sun Dec 06 18:22:02 2009 -0500
@@ -32,7 +32,7 @@
   
   // Not calling the real fetcher because we have to paginate the results
   $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
-  $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC;');
+  $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' GROUP BY log_id, time_id, log_type, action ORDER BY time_id DESC, action ASC;');
   if ( !$q )
     $db->_die();
   $row = $db->fetchrow();