summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-13 10:46:36 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-13 10:46:36 +0000
commit0c9b4dc173c9bc52acbde975cfba0151aae5bb88 (patch)
tree89316ef06e03bd3d1eb811f67c14592973337010
parentebb14ab94ab7d6e4e9e9e7e7cb3ba384c80bae6d (diff)
downloadbrdo-0c9b4dc173c9bc52acbde975cfba0151aae5bb88.tar.gz
brdo-0c9b4dc173c9bc52acbde975cfba0151aae5bb88.tar.bz2
- changed the PEAR version of db_query() to act similar to the MySQL one.
If there is an SQL error db_query() will not return a result.
-rw-r--r--includes/database.pear.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/database.pear.inc b/includes/database.pear.inc
index 7f3da1a00..c0aeb9b7e 100644
--- a/includes/database.pear.inc
+++ b/includes/database.pear.inc
@@ -27,8 +27,9 @@ function db_query($query, $debug = 0) {
if (DB::isError($result)) {
watchdog("error", "database: ". $result->getMessage() ."\nquery: ". htmlspecialchars($query));
}
-
- return $result;
+ else {
+ return $result;
+ }
}
function db_fetch_object($result) {