mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Perform an explicit type conversion in doesFKExists function
This commit is contained in:
parent
036eaf3bae
commit
7f9307feec
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ abstract class AbstractMultiPlatformMigration extends AbstractMigration
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT COUNT(*) FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND CONSTRAINT_NAME = '$fk_name' AND TABLE_NAME = '$table' AND CONSTRAINT_TYPE = 'FOREIGN KEY'";
|
$sql = "SELECT COUNT(*) FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND CONSTRAINT_NAME = '$fk_name' AND TABLE_NAME = '$table' AND CONSTRAINT_TYPE = 'FOREIGN KEY'";
|
||||||
$result = $this->connection->fetchOne($sql);
|
$result = (int) $this->connection->fetchOne($sql);
|
||||||
|
|
||||||
return $result > 0;
|
return $result > 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue