Test acces SQLite depuis PHP
open('bdd_cours.db');
}
}
$db = new MyDB();
if(!$db) {
echo $db->lastErrorMsg();
} else {
echo "Opened database successfully\n";
}
$sql = "SELECT DISTINCT NomCours,NomProf FROM Cours,Suit WHERE (Suit.NumCours = Cours.NumCours)";
$ret = $db->query($sql);
while($row = $ret->fetchArray(SQLITE3_ASSOC) ) {
echo $row['NomCours']." - ".$row['NomProf']."\n";
}
echo "Operation done successfully\n";
$db->close();
?>