Afficher le nombre de ligne affectée par la requête ‘update’

Author:


Download

<html>
<head>
<title>Ligne Affectée</title>
</head>
<body>

<?php
   mysql_connect("localhost","root","");
   mysql_select_db("cours");

   $requete = "UPDATE Etudiant SET Note= '15.9' where ID=1 ";
   $result = mysql_query($requete);
   echo "Succès: ".mysql_affected_rows()." Ligne(s) affectée(s). ";

?>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *


seven − = 1