Help for this page

Select Code to Download


  1. or download this
    
    my $sth = $dbh->prepare('SELECT name FROM user WHERE id = ?');
    ...
    # generates query "SELECT name FROM user WHERE id = '1'"
    $sth->execute('1');
    
  2. or download this
    
    my $sth = $dbh->prepare('SELECT name FROM user LIMIT ?');
    ...
    
    # generates ILLEGAL query "SELECT name FROM user LIMIT '1'"
    $sth->execute('1');