1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-24 07:02:51 +02:00

Display error code in SQL query

This commit is contained in:
Jakub Vrana
2013-01-09 22:19:38 -08:00
parent 588cb7c0c3
commit a9262d8752
7 changed files with 12 additions and 7 deletions

View File

@@ -12,11 +12,12 @@ if (isset($_GET["mssql"])) {
define("DRIVER", "mssql");
if (extension_loaded("sqlsrv")) {
class Min_DB {
var $extension = "sqlsrv", $_link, $_result, $server_info, $affected_rows, $error;
var $extension = "sqlsrv", $_link, $_result, $server_info, $affected_rows, $errno, $error;
function _get_error() {
$this->error = "";
foreach (sqlsrv_errors() as $error) {
$this->errno = $error["code"];
$this->error .= "$error[message]\n";
}
$this->error = rtrim($this->error);