diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-13 10:46:36 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-11-13 10:46:36 +0000 |
commit | 0c9b4dc173c9bc52acbde975cfba0151aae5bb88 (patch) | |
tree | 89316ef06e03bd3d1eb811f67c14592973337010 /includes/database.pear.inc | |
parent | ebb14ab94ab7d6e4e9e9e7e7cb3ba384c80bae6d (diff) | |
download | brdo-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.
Diffstat (limited to 'includes/database.pear.inc')
-rw-r--r-- | includes/database.pear.inc | 5 |
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) { |