$result=pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY (message, variables) ".tablesort_sql($header),30,0,"SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'",$type);
$result=pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY message, variables ".tablesort_sql($header),30,0,"SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'",$type);