X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fprinters.php;h=4c8ad144021e4b670a474469454ec81739dadcef;hb=8ea6c4dd0d9b31b3456d012b0c94339b801bee0c;hp=8104f1729beffb9a2a146bf8cabd56fd3c70e97e;hpb=902f1015d874c33bd7946b17de2ad80b4f2144b6;p=fa-stable.git diff --git a/admin/printers.php b/admin/printers.php index 8104f172..4c8ad144 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -59,7 +59,7 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN print_profiles - $sql= "SELECT COUNT(*) FROM ".TB_PREF."print_profiles WHERE printer = '$selected_id'"; + $sql= "SELECT COUNT(*) FROM ".TB_PREF."print_profiles WHERE printer = ".db_escape($selected_id); $result = db_query($sql,"check printers relations failed"); $myrow = db_fetch_row($result); if ($myrow[0] > 0) @@ -68,7 +68,7 @@ if ($Mode == 'Delete') } else { - $sql="DELETE FROM ".TB_PREF."printers WHERE id='$selected_id'"; + $sql="DELETE FROM ".TB_PREF."printers WHERE id=".db_escape($selected_id); db_query($sql,"could not delete printer definition"); display_notification(_('Selected printer definition has been deleted')); }