Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Where the advice to use DBI bind parameters can go wrong (long)

by dws (Chancellor)
on Jun 14, 2002 at 19:46 UTC ( #174709=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      $sth->prepare("SELECT * FROM companies WHERE name = '$name'");
  2. or download this
      $sth->prepare("SELECT * FROM companies WHERE name = ?");
  3. or download this
      $sth->prepare("SELECT name, url FROM table WHERE name LIKE '$name%');
  4. or download this
      $sth->prepare("SELECT name, url FROM table WHERE name LIKE ?");
      $sth->execute($name . '%');
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://174709]
Approved by footpad
Front-paged by htoug
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-12-27 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls