Created
July 6, 2017 19:54
-
-
Save everaldomatias/c94c47cba9812a33dc2200d852adfa36 to your computer and use it in GitHub Desktop.
Cria tabela caso não exista
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
// Cria a tabela Configuracoes se não existir | |
$conexao_configuracoes = mysqli_connect( $host, $user, $pass, $banco ) or die( "ERROR : " . mysqli_error() ); | |
$configuracoes = "configuracoes"; | |
$cria_configuracoes = $conexao_configuracoes->query("CREATE TABLE IF NOT EXISTS $configuracoes( | |
ID int NOT NULL AUTO_INCREMENT, | |
PRIMARY KEY(ID), | |
km_inicial VARCHAR(50) NOT NULL, | |
data_inicial DATE NOT NULL, | |
valor_compra VARCHAR(50) NOT NULL | |
)"); | |
mysqli_close( $conexao_configuracoes ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment