summaryrefslogtreecommitdiff
path: root/modules/watchdog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-07-12 22:21:55 +0000
committerDries Buytaert <dries@buytaert.net>2003-07-12 22:21:55 +0000
commit22b6d2f30cb1d5a0e7b4f1385ddba79e59dc0b34 (patch)
tree68745484c801b5b3155f8ac068140a0a74f0d558 /modules/watchdog.module
parentd5cdbcd6444e9d36db64c1f80a70611f779ede94 (diff)
downloadbrdo-22b6d2f30cb1d5a0e7b4f1385ddba79e59dc0b34.tar.gz
brdo-22b6d2f30cb1d5a0e7b4f1385ddba79e59dc0b34.tar.bz2
- Performance improvement: changed a fair amount of "left joins" to "inner
joins". Patch by Gerhard.
Diffstat (limited to 'modules/watchdog.module')
-rw-r--r--modules/watchdog.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/watchdog.module b/modules/watchdog.module
index 5306fac37..71c7b5e13 100644
--- a/modules/watchdog.module
+++ b/modules/watchdog.module
@@ -53,7 +53,7 @@ function watchdog_overview($type) {
$color = array("user" => "#FFEEAA", "message" => "#FFFFFF", "special" => "#A49FFF", "warning" => "#FFAA22", "httpd" => "#99DD99", "error" => "#EE4C4C");
$query = array("user" => "WHERE type = 'user'", "regular" => "WHERE type = 'message'", "special" => "WHERE type = 'special'", "warning" => "WHERE type = 'warning'", "error" => "WHERE type = 'error'", "httpd" => "WHERE type = 'httpd'", "actions" => "WHERE link != ''");
- $result = pager_query("SELECT w.*, u.name, u.uid FROM {watchdog} w LEFT JOIN {users} u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY w.timestamp DESC", 50);
+ $result = pager_query("SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY w.timestamp DESC", 50);
while ($watchdog = db_fetch_object($result)) {
if ($background = $color[$watchdog->type]) {
@@ -72,7 +72,7 @@ function watchdog_overview($type) {
function watchdog_view($id) {
- $result = db_query("SELECT w.*, u.name, u.uid FROM {watchdog} w LEFT JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d", $id);
+ $result = db_query("SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = %d", $id);
if ($watchdog = db_fetch_object($result)) {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";