$sth = $dbh->prepare( 'SELECT id, title, summary FROM resource WHERE id = ?' ); $sth->execute($filename); #### ## or