X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitem_categories.php;h=149e23e65746acef08af873d36665e94d000f869;hb=54d84ff9a67620ab38c676cdbcf87853632724f0;hp=f5de480a4aed608016629daa26ec678815180550;hpb=d567a10b7925c8bb97c734e213d6651a979af29d;p=fa-stable.git diff --git a/inventory/manage/item_categories.php b/inventory/manage/item_categories.php index f5de480a..149e23e6 100644 --- a/inventory/manage/item_categories.php +++ b/inventory/manage/item_categories.php @@ -57,7 +57,7 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN 'stock_master' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE category_id='$selected_id'"; + $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE category_id=".db_escape($selected_id); $result = db_query($sql, "could not query stock master"); $myrow = db_fetch_row($result); if ($myrow[0] > 0)