aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/msaccess.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-02-03 09:43:31 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-02-03 09:43:31 +0000
commit129218286b21a19d0bf8b79aef373e9630e5bc82 (patch)
treeb15f0cb51d06cb06c5f343e357db6c94f2c48371 /phpBB/includes/db/msaccess.php
parent40931f12ba11c9fcfe6fae289f00ec689aa455b6 (diff)
downloadforums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar
forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.gz
forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.bz2
forums-129218286b21a19d0bf8b79aef373e9630e5bc82.tar.xz
forums-129218286b21a19d0bf8b79aef373e9630e5bc82.zip
show correct SQL error message if failed during a transaction...
git-svn-id: file:///svn/phpbb/trunk@4788 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/msaccess.php')
-rw-r--r--phpBB/includes/db/msaccess.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/db/msaccess.php b/phpBB/includes/db/msaccess.php
index 3e38cff7b0..b573a59d27 100644
--- a/phpBB/includes/db/msaccess.php
+++ b/phpBB/includes/db/msaccess.php
@@ -386,15 +386,16 @@ class sql_db
{
if (!$this->return_on_error)
{
+ $this_page = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF'];
+ $this_page .= '&' . ((!empty($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : $_ENV['QUERY_STRING']);
+
+ $message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @odbc_errormsg() . '<br /><br /><u>CALLING PAGE</u><br /><br />' . htmlspecialchars($this_page) . (($sql != '') ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '') . '<br />';
+
if ($this->transaction)
{
$this->sql_transaction('rollback');
}
- $this_page = (!empty($_SERVER['PHP_SELF'])) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF'];
- $this_page .= '&' . ((!empty($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : $_ENV['QUERY_STRING']);
-
- $message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @odbc_errormsg() . '<br /><br /><u>CALLING PAGE</u><br /><br />' . htmlspecialchars($this_page) . (($sql != '') ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '') . '<br />';
trigger_error($message, E_USER_ERROR);
}