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

Reset error before using in SQL query

This commit is contained in:
Jakub Vrana
2012-07-15 09:21:22 -07:00
parent 6a3cf71db5
commit 7291ae608d
6 changed files with 9 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ if (isset($_GET["mssql"])) {
function query($query, $unbuffered = false) {
$result = sqlsrv_query($this->_link, $query); //! , array(), ($unbuffered ? array() : array("Scrollable" => "keyset"))
$this->error = "";
if (!$result) {
$this->_get_error();
return false;
@@ -52,6 +53,7 @@ if (isset($_GET["mssql"])) {
function multi_query($query) {
$this->_result = sqlsrv_query($this->_link, $query);
$this->error = "";
if (!$this->_result) {
$this->_get_error();
return false;
@@ -159,6 +161,7 @@ if (isset($_GET["mssql"])) {
function query($query, $unbuffered = false) {
$result = mssql_query($query, $this->_link); //! $unbuffered
$this->error = "";
if (!$result) {
$this->error = mssql_get_last_message();
return false;