Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 8, 2019 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/e85dd06ef69ffea6aa46204d73d68383 to your computer and use it in GitHub Desktop.
Save parzibyte/e85dd06ef69ffea6aa46204d73d68383 to your computer and use it in GitHub Desktop.
<?php
include_once __DIR__ . "/base_de_datos.php";
$definicionTabla = "CREATE TABLE IF NOT EXISTS videojuegos(
id INTEGER PRIMARY KEY AUTOINCREMENT,
anio INTEGER NOT NULL,
titulo TEXT NOT NULL,
genero TEXT NOT NULL
);";
#Podemos usar $baseDeDatos porque incluimos el archivo que la crea
$resultado = $baseDeDatos->exec($definicionTabla);
echo "Tablas creadas correctamente";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment