Update database.php (#7053)

Fix for table_exists method on mysql
This commit is contained in:
Antonio Fernandez 2024-07-18 14:10:05 -04:00 committed by GitHub
parent fcc2eed4fa
commit dcf1f9d17c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -741,7 +741,7 @@
$sql .= "select * from pg_tables where schemaname='public' and tablename = '$table_name' "; $sql .= "select * from pg_tables where schemaname='public' and tablename = '$table_name' ";
} }
if ($this->type == "mysql") { if ($this->type == "mysql") {
$sql .= "SELECT TABLE_NAME FROM information_schema.tables WHERE table_schema = '$db_name' and TABLE_NAME = '$table_name' "; $sql .= "SELECT TABLE_NAME FROM information_schema.tables WHERE table_schema = '".$this->db_name."' and TABLE_NAME = '$table_name' ";
} }
$prep_statement = $this->db->prepare($sql); $prep_statement = $this->db->prepare($sql);
$prep_statement->execute(); $prep_statement->execute();