Help for this page

Select Code to Download


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