Last active
December 27, 2020 19:26
-
-
Save barmgeat/8b340725176e266d817d597a0965cd91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// sql to create table | |
$sql = "CREATE TABLE MyGuests ( | |
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, | |
firstname VARCHAR(30) NOT NULL, | |
lastname VARCHAR(30) NOT NULL, | |
email VARCHAR(50), | |
reg_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
)"; | |
if ($conn->query($sql) === TRUE) { | |
echo "Table MyGuests created successfully"; | |
} else { | |
echo "Error creating table: " . $conn->error; | |
} | |
$conn->close(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment