From ca68e8a3c7e0ca054df5e8e3fc7b8be45a287b49 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 20 Jan 2003 20:19:21 +0000 Subject: [PATCH] - Tidied up some SQL queries. --- modules/blog.module | 4 ++-- modules/blog/blog.module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/blog.module b/modules/blog.module index ba241b8af4f..099ece8e3c8 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -130,7 +130,7 @@ function blog_feed_user($uid = 0) { $account = $user; } - $result = db_query("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 = '$uid' AND n.status = 1 ORDER BY n.nid DESC LIMIT 15"); + $result = db_query("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 LIMIT 15", $uid); $channel["title"] = $account->name. "'s blog"; $channel["link"] = path_uri() . url("blog/view/$uid"); $channel["description"] = $term->description; @@ -296,4 +296,4 @@ function blog_block($op = "list", $delta = 0) { } } -?> \ No newline at end of file +?> diff --git a/modules/blog/blog.module b/modules/blog/blog.module index ba241b8af4f..099ece8e3c8 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -130,7 +130,7 @@ function blog_feed_user($uid = 0) { $account = $user; } - $result = db_query("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 = '$uid' AND n.status = 1 ORDER BY n.nid DESC LIMIT 15"); + $result = db_query("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 LIMIT 15", $uid); $channel["title"] = $account->name. "'s blog"; $channel["link"] = path_uri() . url("blog/view/$uid"); $channel["description"] = $term->description; @@ -296,4 +296,4 @@ function blog_block($op = "list", $delta = 0) { } } -?> \ No newline at end of file +?>