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

View File

@@ -741,7 +741,7 @@
$sql .= "select * from pg_tables where schemaname='public' and tablename = '$table_name' ";
}
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->execute();