in reply to Re^4: Ajax in perl
in thread Ajax/perl/javascript in perl
Furthermore, there are errors in here:
$re=$dbh->perpare("select * from table where firstname="$input1" and lasname="input2");First, it's "prepare", not "perpare". Second, your second parameter should be "$input2" not "input2". Third: you can't just insert double quotes in a doublequotish string, not without backslashes; but fourth: for SQL those should be single quotes instead. And fifth: to guard against SQL injection and just plain errors, use placeholders, not embedded literal values in the SQL!
$re=$dbh->prepare("select * from table where firstname=? and lastname= +?"); $re->execute($input1, $input2);
|
|---|