MINOR Better debugging in MSSQLDatabase::query()

This commit is contained in:
Sean Harvey 2010-05-10 22:56:43 +00:00
parent 572d025029
commit 28434a195d

View File

@ -226,7 +226,8 @@ class MSSQLDatabase extends SS_Database {
Debug::message("\n$sql\n{$endtime}ms\n", false);
}
if(!$handle && $errorLevel) $this->databaseError("Couldn't run query: $sql", $errorLevel);
$error = mssql_get_last_message();
if(!$handle && $errorLevel) $this->databaseError("Couldn't run query ($error): $sql", $errorLevel);
return new MSSQLQuery($this, $handle, $this->mssql);
}