1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Fixing case-sensitivity issue with information_schema query

This commit is contained in:
Jon Ziebell 2019-10-28 22:35:36 -04:00
parent 637e991d5e
commit fc2755db87

View File

@ -798,16 +798,16 @@ final class database extends \mysqli {
self::$types = [];
$result = $this->query('
select
`table_name`,
`column_name`,
`data_type`
`TABLE_NAME`,
`COLUMN_NAME`,
`DATA_TYPE`
from
`information_schema`.`columns`
where
`table_schema` = ' . $this->escape($this->setting->get('database_name')) . '
');
while($row = $result->fetch_assoc()) {
self::$types[$row['table_name'] . '.' . $row['column_name']] = $row['data_type'];
self::$types[$row['TABLE_NAME'] . '.' . $row['COLUMN_NAME']] = $row['DATA_TYPE'];
}
}