Skip to content
Browse files

Fixing stupid bug that was causing the sql insert command to break if…

… a person had a '

in their name
  • Loading branch information...
1 parent 60debf9 commit c79e7cd4c9bdf0680c0e5f9ef464b8fadaf79099 rangi committed Mar 7, 2001
Showing with 2 additions and 0 deletions.
  1. +2 −0 insertdata.pl
View
2 insertdata.pl
@@ -23,6 +23,8 @@
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'}";

0 comments on commit c79e7cd

Please sign in to comment.
Something went wrong with that request. Please try again.