From 8d0eab3cdf71ed164ca2c33e11e3ec8e20b5a8c8 Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Sat, 18 Sep 2010 00:48:49 +0000
Subject: [PATCH] Fix query.

---
 includes/FeedsImporter.inc     | 2 +-
 plugins/FeedsNodeProcessor.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/FeedsImporter.inc b/includes/FeedsImporter.inc
index 0386a53e..64b2554f 100644
--- a/includes/FeedsImporter.inc
+++ b/includes/FeedsImporter.inc
@@ -99,7 +99,7 @@ class FeedsImporter extends FeedsConfigurable {
     $save = new stdClass();
     $save->id = $this->id;
     $save->config = $this->getConfig();
-    if (db_query_range("SELECT 1 FROM {feeds_importer} WHERE id = '%s'", 0, 1, array(':id' => $this->id))->fetchField()) {
+    if (db_query_range("SELECT 1 FROM {feeds_importer} WHERE id = :id", 0, 1, array(':id' => $this->id))->fetchField()) {
       drupal_write_record('feeds_importer', $save, 'id');
     }
     else {
diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc
index 194c18aa..94913bef 100644
--- a/plugins/FeedsNodeProcessor.inc
+++ b/plugins/FeedsNodeProcessor.inc
@@ -317,7 +317,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
     foreach ($this->uniqueTargets($batch) as $target => $value) {
       switch ($target) {
         case 'nid':
-          $nid = db_query("SELECT nid FROM {node} WHERE nid = %d", array(':nid' => $value))->fetchField();
+          $nid = db_query("SELECT nid FROM {node} WHERE nid = :nid", array(':nid' => $value))->fetchField();
           break;
         case 'url':
           $nid = db_query("SELECT nid FROM {feeds_node_item} WHERE feed_nid = :nid AND id = :id AND url = :url", array(':nid' => $source->feed_nid, ':id' => $source->id, ':url' => $value))->fetchField();
-- 
GitLab