connect_error) { die("Connection failed: " . $connection->connect_error); } // Table name $table = "e okul"; // SQL query to check if the table exists and uses InnoDB $sql = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '$database' AND TABLE_NAME = '$table' AND ENGINE = 'InnoDB'"; $result = $connection->query($sql); // Check if the table exists and uses InnoDB if ($result->num_rows > 0) { // SQL query to change the storage engine to MyISAM $alterSql = "ALTER TABLE `$table` ENGINE=MyISAM"; if ($connection->query($alterSql) === TRUE) { echo "Table $table successfully converted to MyISAM.
"; } else { echo "Error converting table $table: " . $connection->error . "
"; } } else { echo "Table $table does not exist or is not using InnoDB."; } // Close the database connection $connection->close(); ?>