Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
query sanitized in listServiceCategoriesà (#11597) (#11633)
Browse files Browse the repository at this point in the history
  • Loading branch information
emabassi-ext authored Aug 29, 2022
1 parent 3d7dc9b commit 3d58bf2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@
$elemArr = array();
$centreonToken = createCSRFToken();

$statement = $pearDB->prepare("SELECT COUNT(*) FROM `service_categories_relation` WHERE `sc_id` = :sc_id");
for ($i = 0; $sc = $dbResult->fetch(); $i++) {
$moptions = "";
$dbResult2 = $pearDB->query(
"SELECT COUNT(*) FROM `service_categories_relation` WHERE `sc_id` = '" . $sc['sc_id'] . "'"
);
$nb_svc = $dbResult2->fetch();
$statement->bindValue(':sc_id', (int) $sc['sc_id'], \PDO::PARAM_INT);
$statement->execute();
$nb_svc = $statement->fetch();

$selectedElements = $form->addElement('checkbox', "select[" . $sc['sc_id'] . "]");

Expand Down

0 comments on commit 3d58bf2

Please sign in to comment.