是否可以从现有的sql文件创建表(如果不存在)?
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";
$conn = new mysqli($servername, $username, $password, $dbname);
$sql = "CREATE TABLE IF NOT EXISTS {FROM FILE : myFile.SQL}";
if ($conn->query($sql) === TRUE) {
echo "updated successfully";
} else {
echo "Error updating" . $conn->error;
}
$conn->close();