mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 06:02:57 +02:00
Display error code in SQL query
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// PDO can be used in several database drivers
|
||||
if (extension_loaded('pdo')) {
|
||||
/*abstract*/ class Min_PDO extends PDO {
|
||||
var $_result, $server_info, $affected_rows, $error;
|
||||
var $_result, $server_info, $affected_rows, $errno, $error;
|
||||
|
||||
function __construct() {
|
||||
global $adminer;
|
||||
@@ -26,8 +26,7 @@ if (extension_loaded('pdo')) {
|
||||
$result = parent::query($query);
|
||||
$this->error = "";
|
||||
if (!$result) {
|
||||
$errorInfo = $this->errorInfo();
|
||||
$this->error = $errorInfo[2];
|
||||
list(, $this->errno, $this->error) = $this->errorInfo();
|
||||
return false;
|
||||
}
|
||||
$this->store_result($result);
|
||||
|
Reference in New Issue
Block a user