Commit c799688d authored by Laurent Joly's avatar Laurent Joly
Browse files

activation fonction delete_poste_info_wpkg

parent 2b241635
......@@ -1024,7 +1024,22 @@ function update_poste_nom_wpkg($config, $id_poste, $nom_poste)
function delete_poste_info_wpkg($config, $id_poste)
{
$wpkg_link = connexion_db_wpkg($config);
$delete_1_query = mysqli_prepare($wpkg_link, "DELETE FROM `applications_profile` WHERE `id_entite`=? AND `type_entite`='poste'");
mysqli_stmt_bind_param($delete_1_query, "i", $id_poste);
mysqli_stmt_execute($delete_1_query);
mysqli_stmt_close($delete_1_query);
$delete_2_query = mysqli_prepare($wpkg_link, "DELETE FROM `parc_profile` WHERE `id_poste`=?");
mysqli_stmt_bind_param($delete_2_query, "i", $id_poste);
mysqli_stmt_execute($delete_2_query);
mysqli_stmt_close($delete_2_query);
$delete_3_query = mysqli_prepare($wpkg_link, "DELETE FROM `poste_app` WHERE `id_poste`=?");
mysqli_stmt_bind_param($delete_3_query, "i", $id_poste);
mysqli_stmt_execute($delete_3_query);
mysqli_stmt_close($delete_3_query);
$delete_4_query = mysqli_prepare($wpkg_link, "DELETE FROM `postes` WHERE `id_poste`=?");
mysqli_stmt_bind_param($delete_4_query, "i", $id_poste);
mysqli_stmt_execute($delete_4_query);
mysqli_stmt_close($delete_4_query);
deconnexion_db_wpkg($wpkg_link);
}
......
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