summaryrefslogtreecommitdiff
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/db.php b/db.php
index 7766c0563..8b1c5a380 100644
--- a/db.php
+++ b/db.php
@@ -134,4 +134,13 @@ function db_affected_rows($link, $result) {
return mysql_affected_rows($link);
}
}
+
+function db_last_error($link) {
+ if (DB_TYPE == "pgsql") {
+ return pg_last_error($link);
+ } else if (DB_TYPE == "mysql") {
+ return mysql_error($link);
+ }
+}
+
?>