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

Big numbers without E

This commit is contained in:
Jakub Vrana
2010-10-23 00:02:24 +02:00
parent e9ae743578
commit 5002b89bd5
10 changed files with 20 additions and 19 deletions

View File

@@ -212,7 +212,7 @@ if (!defined("DRIVER")) {
var $extension = "PDO_MySQL";
function connect($server, $username, $password) {
$this->dsn("mysql:host=" . str_replace(":", ";unix_socket=", preg_replace('~:([0-9])~', ';port=\\1', $server)), $username, $password);
$this->dsn("mysql:host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
$this->query("SET NAMES utf8"); // charset in DSN is ignored
return true;
}
@@ -820,7 +820,7 @@ if (!defined("DRIVER")) {
global $connection;
$return = $connection->result("SHOW CREATE TABLE " . table($table), 1);
if (!$auto_increment) {
$return = preg_replace('~ AUTO_INCREMENT=[0-9]+~', '', $return); //! skip comments
$return = preg_replace('~ AUTO_INCREMENT=\\d+~', '', $return); //! skip comments
}
return $return;
}