1
0
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:
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

@@ -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);