ggdworkshop/dbconnect.php
German Correa 379507e346 Crea la base de datos,
Funciona el registro (sin validar si existe)
Y mostar la lista de participantes
2017-12-01 21:27:32 -03:00

28 lines
592 B
PHP

<?php
/**
* SQLite connnection
*/
class SQLiteConnection {
/**
* PDO instance
* @var type
*/
private $pdo;
/**
* return in instance of the PDO object that connects to the SQLite database
* @return \PDO
*/
public function connect() {
if ($this->pdo == null) {
try {
$this->pdo = new \PDO("sqlite:" . Config::PATH_TO_SQLITE_FILE);
} catch (\PDOException $e) {
// handle the exception here
}
}
return $this->pdo;
}
}
?>