aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/dba.php10
-rw-r--r--include/items.php2
-rw-r--r--mod/dfrn_notify.php2
-rw-r--r--mod/profiles.php2
4 files changed, 13 insertions, 3 deletions
diff --git a/include/dba.php b/include/dba.php
index 044263194..54084d835 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -134,6 +134,16 @@ function q($sql) {
return $ret;
}}
+// raw db query, no arguments
+
+if(! function_exists('dbq')) {
+function dbq($sql) {
+
+ global $db;
+ $ret = $db->q($sql);
+ return $ret;
+}}
+
// Caller is responsible for ensuring that any integer arguments to
// dbesc_array are actually integers and not malformed strings containing
diff --git a/include/items.php b/include/items.php
index c10701b67..20f843613 100644
--- a/include/items.php
+++ b/include/items.php
@@ -550,7 +550,7 @@ function item_store($arr) {
logger('item_store: ' . print_r($arr,true), LOGGER_DATA);
- $r = q("INSERT INTO `item` (`"
+ $r = dbq("INSERT INTO `item` (`"
. implode("`, `", array_keys($arr))
. "`) VALUES ('"
. implode("', '", array_values($arr))
diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php
index 745223dd7..e7dbf74a1 100644
--- a/mod/dfrn_notify.php
+++ b/mod/dfrn_notify.php
@@ -106,7 +106,7 @@ function dfrn_notify_post(&$a) {
dbesc_array($msg);
- $r = q("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg))
+ $r = dbq("INSERT INTO `mail` (`" . implode("`, `", array_keys($msg))
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
// send email notification if requested.
diff --git a/mod/profiles.php b/mod/profiles.php
index b8151eadd..26e8d4ec5 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -249,7 +249,7 @@ function profiles_content(&$a) {
dbesc_array($r1[0]);
- $r2 = q("INSERT INTO `profile` (`"
+ $r2 = dbq("INSERT INTO `profile` (`"
. implode("`, `", array_keys($r1[0]))
. "`) VALUES ('"
. implode("', '", array_values($r1[0]))