<?php
require 'database.inc.php';
set_time_limit(600);
?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>

<head>
	<title>Title here!</title>
</head>

<body>
	<?php
	$requette = "SELECT ca.NoCommande, ca.Position FROM commandearticles1 ca, commande1 c WHERE c.NoCommande = ca.NoCommande AND ca.NoArticle = 'DEPL' AND c.DateCommande > '2011-09-01'";
	$resultat = Connection::executeRawQueryWithfetchAll($requette);
	foreach ($resultat as $ligne) {
		$requette2 = "UPDATE commandearticles1 SET NoArticle = 'DEPSY', Description = '" . Connection::getConnection()->quote("DEPANNAGE S. J.") . "' WHERE NoCommande = " . $ligne["NoCommande"] . " AND Position = " . $ligne["Position"];
		//mysql_query($requette2);
		echo $requette2 . "<br/>";
	}

	?>
</body>

</html>