1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
if ($_SESSION['Sess_nom']<>'VISITEUR') {
$quiz_ID=$_SESSION['Sess_ID_quiz'];
$eleve_ID=$_SESSION['Sess_ID_eleve'];
$nom_classe=$_SESSION['Sess_classe'];
$fait='O';
mysql_select_db($database_conn_intranet, $conn_intranet);
$query_rsActivite = sprintf("SELECT * FROM stock_activite WHERE eleve_ID = %s AND quiz_ID=%s", $colname_rsActivite,$colname2_rsActivite);
$rsActivite = mysql_query($query_rsActivite, $conn_intranet) or die(mysql_error());
$row_rsActivite = mysql_fetch_assoc($rsActivite);
$totalRows_rsActivite = mysql_num_rows($rsActivite);
if ($totalRows_rsActivite<>'0')
{
$sql_delete = sprintf("DELETE FROM stock_activite WHERE eleve_ID = %s AND quiz_ID=%s", $colname_rsActivite,$colname2_rsActivite);
mysql_query($sql_delete) or die('Erreur SQL !'.$sql_delete.mysql_error());
}
$sql = "INSERT INTO stock_activite VALUES('$ID_activite','$eleve_ID','$nom_classe','$quiz_ID','$note','$debut','$fin','$fait')";
mysql_query($sql) or die('Erreur SQL !'.$sql.mysql_error());
mysql_close();
}
?> |
Partager