You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
<?php
|
|
|
|
require_once('../BDD/SqliteDb.php');
|
|
$db = new SqliteDb('o');
|
|
|
|
|
|
$numDemo = $_GET['numDemo'];
|
|
$numChapitre = $_GET['numChapitre'];
|
|
$numDemoPrec = $numDemo-1;
|
|
$test = 999;
|
|
|
|
if($numDemo!=1){
|
|
|
|
$sqliteQuery = $db->prepare('UPDATE Demonstration SET numDemo=? WHERE numDemo=? AND chapitre=?');
|
|
$sqliteQuery->bindParam(1, $test);
|
|
$sqliteQuery->bindParam(2, $numDemo);
|
|
$sqliteQuery->bindParam(3, $numChapitre);
|
|
$result = $sqliteQuery->execute();
|
|
|
|
|
|
$sqliteQuery = $db->prepare('UPDATE Demonstration SET numDemo=? WHERE numDemo=? AND chapitre=?');
|
|
$sqliteQuery->bindParam(1, $numDemo);
|
|
$sqliteQuery->bindParam(2, $numDemoPrec);
|
|
$sqliteQuery->bindParam(3, $numChapitre);
|
|
$resulti = $sqliteQuery->execute();
|
|
|
|
|
|
$sqliteQuery = $db->prepare('UPDATE Demonstration SET numDemo=? WHERE numDemo=? AND chapitre=?');
|
|
$sqliteQuery->bindParam(1, $numDemoPrec);
|
|
$sqliteQuery->bindParam(2, $test);
|
|
$sqliteQuery->bindParam(3, $numChapitre);
|
|
$resultp = $sqliteQuery->execute();
|
|
|
|
|
|
|
|
}
|
|
|
|
//header("Location: index.php");
|
|
|
|
|