summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2010-01-19 14:16:33 (GMT)
committer Alex Barth2010-01-19 14:16:33 (GMT)
commitc8ad00c7552312217455a2db136a44831e7bef4d (patch)
treeae7f4165c61871e1b7d1bcdf5ae406169ca0db2f
parentb0dcd4088a4c617e950a13dedd32d9e612557664 (diff)
#688850 k4ml: Fix incompatible PostgreSQL query.
-rw-r--r--CHANGELOG.txt5
-rw-r--r--data.module4
-rw-r--r--data_node/data_node.module6
3 files changed, 10 insertions, 5 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5d67c74..3bf966c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,10 @@
// $Id$
+Data 6.x x.x xxx, 20xx-xx-xx
+----------------------------
+
+- #688850 k4ml: Fix incompatible PostgreSQL query.
+
Data 6.x 1.0 Alpha 9, 2009-11-18
--------------------------------
diff --git a/data.module b/data.module
index 28751df..9cfd623 100644
--- a/data.module
+++ b/data.module
@@ -396,7 +396,7 @@ function _data_load_table($name = NULL, $reset = FALSE) {
* data_tables.
*/
function _data_override($name) {
- if (!db_result(db_query('SELECT name FROM {data_tables} WHERE name = "%s"', $name))) {
+ if (!db_result(db_query("SELECT name FROM {data_tables} WHERE name = '%s'", $name))) {
if ($table = _data_load_table($name)) {
drupal_write_record('data_tables', $table);
}
@@ -412,4 +412,4 @@ function data_include($class) {
include drupal_get_path('module', 'data') .'/includes/'. $class .'.inc';
$included[$class] = TRUE;
}
-} \ No newline at end of file
+}
diff --git a/data_node/data_node.module b/data_node/data_node.module
index ac8022a..809470d 100644
--- a/data_node/data_node.module
+++ b/data_node/data_node.module
@@ -320,7 +320,7 @@ function data_node_add($table, $id, $nid) {
*/
function data_node_get_nids($table, $id) {
$list = array();
- $result = db_query('SELECT nid FROM {data_table_node} WHERE data_table_name = "%s" AND id = %d', $table->get('name'), $id);
+ $result = db_query("SELECT nid FROM {data_table_node} WHERE data_table_name = '%s' AND id = %d", $table->get('name'), $id);
while ($row = db_fetch_object($result)) {
$list[] = $row->nid;
}
@@ -331,7 +331,7 @@ function data_node_get_nids($table, $id) {
* Remove a relationship between a data table and a node.
*/
function data_node_remove($table, $id, $nid) {
- db_query('DELETE FROM {data_table_node} WHERE data_table_name = "%s" AND id = %d AND nid = %d', $table->get('name'), $id, $nid);
+ db_query("DELETE FROM {data_table_node} WHERE data_table_name = '%s' AND id = %d AND nid = %d", $table->get('name'), $id, $nid);
}
/**
@@ -341,7 +341,7 @@ function data_node_get_nodes($table) {
$nodes = array();
$meta = $table->get('meta');
if ($meta['data_node']['content_type']) {
- $result = db_query('SELECT nid, title FROM {node} WHERE type = "%s" ORDER BY title ASC', $meta['data_node']['content_type']);
+ $result = db_query("SELECT nid, title FROM {node} WHERE type = '%s' ORDER BY title ASC", $meta['data_node']['content_type']);
while ($node = db_fetch_object($result)) {
$nodes[$node->nid] = $node->title;
}