in reply to Re: What are placeholders in DBI, and why would I want to use them?
in thread What are placeholders in DBI, and why would I want to use them?
You mean that DBI queries should be written:
Instead of:my $query = $dbh->prepare ( "select id, name from user where name = ?" ); $query->execute( $name_from_params );
Couldn't agree more.my $query = $dbh->prepare ( "select id, name from user " . "where name = '$name_from_params'" ); $query->execute();
--tidiness is the memory loss of environmental mnemonics
|
---|
In Section
Seekers of Perl Wisdom