dblayeroo : getTableSchema was wrong if multiple tables have identical field name

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5998 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2020-05-26 20:22:26 +00:00
parent 71e28ac2f5
commit 9ae8147bbd

View File

@@ -873,7 +873,8 @@ class dblayeroo
FROM information_schema.REFERENTIAL_CONSTRAINTS AS rCons, FROM information_schema.REFERENTIAL_CONSTRAINTS AS rCons,
information_schema.KEY_COLUMN_USAGE as kColUsage information_schema.KEY_COLUMN_USAGE as kColUsage
WHERE rCons.CONSTRAINT_SCHEMA=:dbname AND rCons.TABLE_NAME=:table WHERE rCons.CONSTRAINT_SCHEMA=:dbname AND rCons.TABLE_NAME=:table
AND rCons.CONSTRAINT_NAME=kColUsage.CONSTRAINT_NAME"); AND rCons.CONSTRAINT_NAME=kColUsage.CONSTRAINT_NAME
AND rCons.CONSTRAINT_SCHEMA=kColUsage.CONSTRAINT_SCHEMA");
$st->execute (array(':dbname' => $this->databasename (), $st->execute (array(':dbname' => $this->databasename (),
':table' => $tableName)); ':table' => $tableName));
$foreignTmp = $st->fetchAll (\PDO::FETCH_ASSOC); $foreignTmp = $st->fetchAll (\PDO::FETCH_ASSOC);