diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-07-12 22:21:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-07-12 22:21:55 +0000 |
commit | 22b6d2f30cb1d5a0e7b4f1385ddba79e59dc0b34 (patch) | |
tree | 68745484c801b5b3155f8ac068140a0a74f0d558 /modules/blog | |
parent | d5cdbcd6444e9d36db64c1f80a70611f779ede94 (diff) | |
download | brdo-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/blog')
-rw-r--r-- | modules/blog/blog.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module index ec912bd8f..951d6a060 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -91,7 +91,7 @@ function blog_feed_user($uid = 0) { $account = $user; } - $result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n LEFT JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.nid DESC", $uid, 0, 15); + $result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.nid DESC", $uid, 0, 15); $channel["title"] = $account->name. "'s blog"; $channel["link"] = url("blog/view/$uid"); $channel["description"] = $term->description; @@ -99,7 +99,7 @@ function blog_feed_user($uid = 0) { } function blog_feed_last() { - $result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n LEFT JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.nid DESC", 0, 15); + $result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.nid DESC", 0, 15); $channel["title"] = variable_get("site_name", "drupal") ." blogs"; $channel["link"] = url("blog"); $channel["description"] = $term->description; |