Code-Samples/php/Php-selectinto.php Backing UP Data in Mysqli connect_error) { die("Connection not established: " . $connection->connect_error); } $query = "Use Hospital;"; $connection->query($query); // Copying data from one table to the other. $query = "INSERT INTO `patient2` SELECT * FROM `patient`"; $output = $connection->query($query); $connection->close(); ?>