- or download this
my $sth = $dbh->prepare('Select * from users where name = "$name"');
$sth->execute();
- or download this
my $var = "Hello";
my $other = '$var world'; # Wrong.
my $outro = '"$var" world'; # Still wrong.
my $right = "$var world"; # Correct.
- or download this
my $sth = $dbh->prepare( 'SELECT * FROM users WHERE name = ?' );
$sth->execute( $name );