diff options
-rw-r--r-- | modules/bloggerapi.module | 2 | ||||
-rw-r--r-- | modules/search.module | 4 | ||||
-rw-r--r-- | modules/search/search.module | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/bloggerapi.module b/modules/bloggerapi.module index 1b0adc76c..0502357be 100644 --- a/modules/bloggerapi.module +++ b/modules/bloggerapi.module @@ -272,7 +272,7 @@ function bloggerapi_node_recent($num) { global $user; if (($num == 0) or ($num > 100)) $num = 50; - $result = db_query("SELECT n.*, u.name FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '$user->uid' ORDER BY n.nid DESC LIMIT ". $num); + $result = db_query("SELECT n.*, u.name FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.uid = '%d' ORDER BY n.nid DESC LIMIT %d", $user->uid, $num); if ($result) { while ($blog = db_fetch_object($result)) { $body = "<title>$blog->title</title>\n". $blog->body; diff --git a/modules/search.module b/modules/search.module index 4e964b0d0..d6acc1b71 100644 --- a/modules/search.module +++ b/modules/search.module @@ -261,7 +261,7 @@ function update_index($search_array) { ** the search index */ foreach ($newwords as $key => $value) { - db_query("INSERT INTO search_index VALUES('$key', ". $node["lno"] .", '$node_type', $value)"); + db_query("INSERT INTO search_index VALUES('%s', '%s', '%s', '%s')", $key, $node["lno"], $node_type, $value); } // Zap the weighted words array, so we don't add multiples. @@ -374,4 +374,4 @@ function search_page() { } } -?>
\ No newline at end of file +?> diff --git a/modules/search/search.module b/modules/search/search.module index 4e964b0d0..d6acc1b71 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -261,7 +261,7 @@ function update_index($search_array) { ** the search index */ foreach ($newwords as $key => $value) { - db_query("INSERT INTO search_index VALUES('$key', ". $node["lno"] .", '$node_type', $value)"); + db_query("INSERT INTO search_index VALUES('%s', '%s', '%s', '%s')", $key, $node["lno"], $node_type, $value); } // Zap the weighted words array, so we don't add multiples. @@ -374,4 +374,4 @@ function search_page() { } } -?>
\ No newline at end of file +?> |