mirror of
https://github.com/dg/dibi.git
synced 2025-02-24 10:53:17 +01:00
MySQL drivers: getColumns() obtains comments
This commit is contained in:
parent
08e70fda61
commit
532ed3a316
@ -467,7 +467,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
*/
|
||||
public function getColumns($table)
|
||||
{
|
||||
$this->query("SHOW COLUMNS FROM `$table`");
|
||||
$this->query("SHOW FULL COLUMNS FROM `$table`");
|
||||
$res = array();
|
||||
while ($row = $this->fetch(TRUE)) {
|
||||
$type = explode('(', $row['Type']);
|
||||
@ -479,6 +479,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
'nullable' => $row['Null'] === 'YES',
|
||||
'default' => $row['Default'],
|
||||
'autoincrement' => $row['Extra'] === 'auto_increment',
|
||||
'vendor' => $row,
|
||||
);
|
||||
}
|
||||
$this->free();
|
||||
|
@ -470,7 +470,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = $table AND TABLE_SCHEMA = DATABASE()
|
||||
");*/
|
||||
$this->query("SHOW COLUMNS FROM `$table`");
|
||||
$this->query("SHOW FULL COLUMNS FROM `$table`");
|
||||
$res = array();
|
||||
while ($row = $this->fetch(TRUE)) {
|
||||
$type = explode('(', $row['Type']);
|
||||
@ -482,6 +482,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
'nullable' => $row['Null'] === 'YES',
|
||||
'default' => $row['Default'],
|
||||
'autoincrement' => $row['Extra'] === 'auto_increment',
|
||||
'vendor' => $row,
|
||||
);
|
||||
}
|
||||
$this->free();
|
||||
|
Loading…
x
Reference in New Issue
Block a user