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

Non-MySQL: Better field types in SQL command

This commit is contained in:
Jakub Vrana
2025-03-24 14:41:08 +01:00
parent f5d23a8cad
commit 50cdbbe415
7 changed files with 10 additions and 9 deletions

View File

@@ -93,8 +93,9 @@ if (extension_loaded('pdo')) {
function fetch_field() {
$row = (object) $this->getColumnMeta($this->_offset++);
$row->type = $row->pdo_type; //! map to MySQL numbers
$row->charsetnr = (isset($row->flags) && in_array("blob", (array) $row->flags) ? 63 : 0);
$type = $row->pdo_type;
$row->type = ($type == \PDO::PARAM_INT ? 0 : 15);
$row->charsetnr = ($type == \PDO::PARAM_LOB || (isset($row->flags) && in_array("blob", (array) $row->flags)) ? 63 : 0);
return $row;
}