From c79e7cd4c9bdf0680c0e5f9ef464b8fadaf79099 Mon Sep 17 00:00:00 2001 From: rangi Date: Wed, 7 Mar 2001 21:12:47 +0000 Subject: [PATCH] Fixing stupid bug that was causing the sql insert command to break if a person had a ' in their name --- insertdata.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/insertdata.pl b/insertdata.pl index b2d33baeff..0391b8c938 100755 --- a/insertdata.pl +++ b/insertdata.pl @@ -23,6 +23,8 @@ my $problems; my $env; foreach my $key (@names){ $data{$key}=$input->param($key); + $data{$key}=~ s/\'/\\\'/g; + $data{$key}=~ s/\"/\\\"/g; } my $dbh=C4Connect; my $query="Select * from borrowers where borrowernumber=$data{'borrowernumber'}"; -- 2.39.5