mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 12:21:24 +02:00
Fix multiquery
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1319 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -66,7 +66,8 @@ if (extension_loaded("mysqli")) {
|
||||
if (!$result) {
|
||||
$this->error = mysql_error($this->_link);
|
||||
return false;
|
||||
} elseif ($result === true) {
|
||||
}
|
||||
if ($result === true) {
|
||||
$this->affected_rows = mysql_affected_rows($this->_link);
|
||||
$this->info = mysql_info($this->_link);
|
||||
return true;
|
||||
|
@@ -20,27 +20,32 @@ if (extension_loaded('pdo')) {
|
||||
}
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = parent::query($query);
|
||||
if (!$result) {
|
||||
$return = parent::query($query);
|
||||
if (!$return) {
|
||||
$errorInfo = $this->errorInfo();
|
||||
$this->error = $errorInfo[2];
|
||||
return false;
|
||||
}
|
||||
$this->_result = $result;
|
||||
if (!$result->columnCount()) {
|
||||
$this->affected_rows = $result->rowCount();
|
||||
return true;
|
||||
if ($return->columnCount()) {
|
||||
$this->affected_rows = $return->rowCount();
|
||||
} else {
|
||||
$return->num_rows = $return->rowCount(); // is not guaranteed to work with all drivers
|
||||
}
|
||||
$result->num_rows = $result->rowCount(); // is not guaranteed to work with all drivers
|
||||
return $result;
|
||||
return $return;
|
||||
}
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->query($query);
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
function store_result() {
|
||||
return ($this->_result->columnCount() ? $this->_result : true);
|
||||
$return = &$this->_result;
|
||||
if ($return->columnCount()) {
|
||||
$this->affected_rows = $return->rowCount();
|
||||
return true;
|
||||
}
|
||||
$return->num_rows = $return->rowCount();
|
||||
return $return;
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
|
Reference in New Issue
Block a user