From dae5c2208c936c82b07eea35ce95f0aba03f5413 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 7 Apr 2001 20:00:21 +0000 Subject: - improved rating module: it now shows some basic statistics :-) - updated database files - removed affialiate-site and drupal-site module: maintain them by hand through a box for now will you. --- includes/database.inc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'includes') diff --git a/includes/database.inc b/includes/database.inc index b86ad6dcf..30b1c5a1f 100644 --- a/includes/database.inc +++ b/includes/database.inc @@ -6,16 +6,9 @@ function db_connect($host, $user, $pass, $name) { // NOTE: we are using a persistent connection! } -function db_query($query, $debug = false) { - // perform query: - $qid = mysql_query($query); - - // debug output (if required): - if ($debug) print "
query: ". htmlspecialchars($query) ."
error message: ". mysql_error() ."
"; - if (!$qid) watchdog("error", "database: ". mysql_error() ."
query: ". htmlspecialchars($query) .""); - - // return result from query: - return $qid; +function db_query($query) { + if ($result = mysql_query($query)) return $result; + else watchdog("error", "database: ". mysql_error() ."
query: ". htmlspecialchars($query)); } function db_fetch_object($qid) { -- cgit v1.2.3