diff options
author | David M <davidmj@users.sourceforge.net> | 2006-04-18 03:56:26 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-04-18 03:56:26 +0000 |
commit | 1149fd2ca80f195a275cc378915cfe8fc111df9f (patch) | |
tree | 0ec94130f93af2a2d5528a35e8f6b24f3f613d68 /phpBB/includes/db/mssql.php | |
parent | 03b9af1f28c0d537d8459c9820e0f49464046e33 (diff) | |
download | forums-1149fd2ca80f195a275cc378915cfe8fc111df9f.tar forums-1149fd2ca80f195a275cc378915cfe8fc111df9f.tar.gz forums-1149fd2ca80f195a275cc378915cfe8fc111df9f.tar.bz2 forums-1149fd2ca80f195a275cc378915cfe8fc111df9f.tar.xz forums-1149fd2ca80f195a275cc378915cfe8fc111df9f.zip |
- oopsie
git-svn-id: file:///svn/phpbb/trunk@5794 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/db/mssql.php')
-rw-r--r-- | phpBB/includes/db/mssql.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index dde20bed8f..cd11b683a3 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -317,10 +317,21 @@ class dbal_mssql extends dbal */ function _sql_error() { - return array( + + $error = array( 'message' => @mssql_get_last_message($this->db_connect_id), - 'code' => @mssql_query("SELECT @@ERROR", $this->db_connect_id) + 'code' => '' ); + + $result_id = @mssql_query('SELECT @@ERROR as errno', $this->db_connect_id); + if ($result_id) + { + $row = @mssql_fetch_assoc($result_id); + $error['code'] = $row['errno']; + @mssql_free_result($result_id); + } + + return $error; } /** |