Commit 90c7019c authored by Laurent Joly's avatar Laurent Joly
Browse files

Update wpkg_libsql.php

fonction pour forcer le rechargement d'un rapport
parent 6e35b8dd
...@@ -1657,4 +1657,31 @@ function maintenance_poste_suppression($config,$id_poste) ...@@ -1657,4 +1657,31 @@ function maintenance_poste_suppression($config,$id_poste)
return $nom_poste; return $nom_poste;
} }
function maintenance_poste_reset_wpkg($config,$id_poste)
{
$wpkg_link = connexion_db_wpkg($config);
$query = mysqli_prepare($wpkg_link, "SELECT nom_poste, flag_poste FROM `postes` WHERE id_poste=?");
mysqli_stmt_bind_param($query, "i", $id_poste);
mysqli_stmt_execute($query);
mysqli_stmt_bind_result($query, $res_nom_poste, $res_flag_poste);
mysqli_stmt_store_result($query);
$num_rows = mysqli_stmt_num_rows($query);
$nom_poste=0;
if ($num_rows == 1)
{
while (mysqli_stmt_fetch($query))
{
$nom_poste = $res_nom_poste;
}
$update_query = mysqli_prepare($wpkg_link, "UPDATE `postes` SET `sha_rapport_poste`='miaou', `date_modification_poste`=NOW() WHERE `id_poste`=?");
mysqli_stmt_bind_param($update_query, "i", $id_poste);
mysqli_stmt_execute($update_query);
mysqli_stmt_close($update_query);
}
mysqli_stmt_close($query);
deconnexion_db_wpkg($wpkg_link);
return $nom_poste;
}
?> ?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment