Skip to content

Commit

Permalink
fix: SQL in MySQLi\Connection::_foreignKeyData()
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 30, 2021
1 parent 775f50c commit 21f3308
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions system/Database/MySQLi/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ protected function _foreignKeyData(string $table): array
FROM information_schema.TABLE_CONSTRAINTS AS tc
INNER JOIN information_schema.REFERENTIAL_CONSTRAINTS AS rc
ON tc.CONSTRAINT_NAME = rc.CONSTRAINT_NAME
AND tc.CONSTRAINT_SCHEMA = rc.CONSTRAINT_SCHEMA
INNER JOIN information_schema.KEY_COLUMN_USAGE AS kcu
ON tc.CONSTRAINT_NAME = kcu.CONSTRAINT_NAME
AND tc.CONSTRAINT_SCHEMA = kcu.CONSTRAINT_SCHEMA
WHERE
tc.CONSTRAINT_TYPE = ' . $this->escape('FOREIGN KEY') . ' AND
tc.TABLE_SCHEMA = ' . $this->escape($this->database) . ' AND
Expand Down

0 comments on commit 21f3308

Please sign in to comment.