summaryrefslogtreecommitdiff
path: root/framework/Data/Common
diff options
context:
space:
mode:
authorrojaro <>2010-06-15 14:09:37 +0000
committerrojaro <>2010-06-15 14:09:37 +0000
commita32e61995eda7efb4c0c3e0ed952480e56160a31 (patch)
tree8d048450112eef21493cf2eb6dc6fa990fa71980 /framework/Data/Common
parentd055e87c31eb67981fa9c8d82728db5336567903 (diff)
Fixing #268
Diffstat (limited to 'framework/Data/Common')
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php
index fad33cea..0e17f52c 100644
--- a/framework/Data/Common/Mysql/TMysqlMetaData.php
+++ b/framework/Data/Common/Mysql/TMysqlMetaData.php
@@ -263,7 +263,7 @@ class TMysqlMetaData extends TDbMetaData
*/
protected function getForeignConstraints($schemaName, $tableName)
{
- $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA = :schema' : '';
+ $andSchema = $schemaName !== null ? 'AND TABLE_SCHEMA LIKE :schema' : '';
$sql = <<<EOD
SELECT
CONSTRAINT_NAME as con,
@@ -275,7 +275,7 @@ class TMysqlMetaData extends TDbMetaData
`INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE`
WHERE
REFERENCED_TABLE_NAME IS NOT NULL
- AND TABLE_NAME = :table
+ AND TABLE_NAME LIKE :table
$andSchema
EOD;
$command = $this->getDbConnection()->createCommand($sql);