<?php
	session_start ();
	include('database.php');
	DB_connexion(); 
	include('fonctions.php');

	
	charger_configuration();
	
	$table = "copy_reservation2017";
	
	$sql = "SELECT * FROM " .$table;
	
	echo $sql;
	
	mysqli_query($connexion, "SET NAMES 'utf8'");
	$result = mysqli_query($connexion, $sql );
	
	if(!$result)
	{
		die('Impossible d\'exécuter la requête :' . mysql_error());
	}

	$n = mysqli_num_rows($result);	
	
	echo $n; 	
	echo "<br>";
	
	$formule_val = "courte";
	
	for( $i=1; $i <= $n ; $i++)		
	{ 
		$sql = "UPDATE " .$table ." SET formule = '$formule_val' WHERE id ='$i' ";	
		echo $sql; 	
		echo "<br>";
		mysqli_query($connexion, $sql );

	}	
	//$sql = "UPDATE " .$table ." SET mode = '$mode_val' , formule = '$formule_val' , indice = '$indice' WHERE id ='$id' ";	
					
	//mysqli_query($connexion, $sql );

			
	//echo "Données enregistées";	
	//echo '<br><br>';
	
?>	
