1
0
mirror of https://github.com/beestat/app.git synced 2025-06-01 04:37:12 -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 = []; self::$types = [];
$result = $this->query(' $result = $this->query('
select select
`table_name`, `TABLE_NAME`,
`column_name`, `COLUMN_NAME`,
`data_type` `DATA_TYPE`
from from
`information_schema`.`columns` `information_schema`.`columns`
where where
`table_schema` = ' . $this->escape($this->setting->get('database_name')) . ' `table_schema` = ' . $this->escape($this->setting->get('database_name')) . '
'); ');
while($row = $result->fetch_assoc()) { 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'];
} }
} }