|
|
|
@ -16,7 +16,7 @@ class SqliteDb extends SQLite3
|
|
|
|
|
$this->exec('CREATE TABLE Correct ( question STRING, reponse STRING, type STRING, fonctionCorrect STRING,testUser STRING)');
|
|
|
|
|
|
|
|
|
|
//Question 1
|
|
|
|
|
$type = 'query';
|
|
|
|
|
/* $type = 'query';
|
|
|
|
|
$fonctionCorrect = null;
|
|
|
|
|
$testU = null;
|
|
|
|
|
$reponse = 'SELECT count(*) FROM stats WHERE prenomnoms=\'Kevin Durant\' ';
|
|
|
|
@ -80,21 +80,21 @@ class SqliteDb extends SQLite3
|
|
|
|
|
$stmt->bindParam(2,$type);
|
|
|
|
|
$stmt->bindParam(3,$fonctionCorrect);
|
|
|
|
|
$stmt->bindParam(4,$testU);
|
|
|
|
|
$stmt->execute();
|
|
|
|
|
$stmt->execute();*/
|
|
|
|
|
|
|
|
|
|
//Question 9
|
|
|
|
|
/* $type = 'tablemodification';
|
|
|
|
|
$fonctionCorrect = 'idjoueur';
|
|
|
|
|
$type = 'tablemodification';
|
|
|
|
|
$fonctionCorrect = 'IDJOUEUR';
|
|
|
|
|
$testU = null;
|
|
|
|
|
$reponse = ' SELECT column_name FROM all_tab_columns WHERE table_name = \'JOUEUR\' ';
|
|
|
|
|
$q = "INSERT INTO Correct VALUES ('Déterminer pour Kevin Durant pour le match du 30-oct-17 quelle est l équipe qui joue à domicile', ?,?,?,? )";
|
|
|
|
|
$reponse = 'SELECT column_name FROM all_TAB_COLUMNS WHERE table_name = \'TEST\' ';
|
|
|
|
|
$q = "INSERT INTO Correct VALUES ('Modifier la table JOUEUR pour ajouter un champ idjoueur', ?,?,?,? )";
|
|
|
|
|
$stmt = $this->prepare($q);
|
|
|
|
|
$stmt->bindParam(1,$reponse);
|
|
|
|
|
$stmt->bindParam(2,$type);
|
|
|
|
|
$stmt->bindParam(3,$fonctionCorrect);
|
|
|
|
|
$stmt->bindParam(4,$testU);
|
|
|
|
|
|
|
|
|
|
$stmt->execute();*/
|
|
|
|
|
$stmt->execute();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createLogin(){
|
|
|
|
|