X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fmovement_types.php;h=60b8e83e30ce52fcb6ac91659a4b68d18fefaf3d;hb=8ea6c4dd0d9b31b3456d012b0c94339b801bee0c;hp=5f75844fca8e536ddde2d7f5ce7aae2a6a8573ed;hpb=3ff9ed87cb909f19c8fe3e7dfda5df79d0c01a6c;p=fa-stable.git diff --git a/inventory/manage/movement_types.php b/inventory/manage/movement_types.php index 5f75844f..60b8e83e 100644 --- a/inventory/manage/movement_types.php +++ b/inventory/manage/movement_types.php @@ -57,7 +57,8 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_moves - WHERE type=" . ST_INVADJUST. " AND person_id=$selected_id"; + WHERE type=" . ST_INVADJUST. " AND person_id=".db_escape($selected_id); + $result = db_query($sql, "could not query stock moves"); $myrow = db_fetch_row($result); if ($myrow[0] > 0)