Skip to content

Instantly share code, notes, and snippets.

@SakshamInABox
Last active May 8, 2019 09:57
Show Gist options
  • Save SakshamInABox/991904b4e834b2de4362feba87aa53ab to your computer and use it in GitHub Desktop.
Save SakshamInABox/991904b4e834b2de4362feba87aa53ab to your computer and use it in GitHub Desktop.
$table = "CREATE TABLE status (
code INT(4) ZEROFILL AUTO_INCREMENT PRIMARY KEY NOT NULL,
date DATE NOT NULL,
status VARCHAR(512) NOT NULL,
sharePublic BOOLEAN,
shareFriends BOOLEAN,
shareMe BOOLEAN,
allowLike BOOLEAN,
allowComment BOOLEAN,
allowShare BOOLEAN)";
if ($connection -> query($table) === TRUE) {
//Table Created
}
else {
//Creation Error
error_log ("Error Creating Table: " . $connection->error, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment