Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 perusing the Monastery: (8)
As of 2015-02-28 06:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    On my keyboard, Caps lock is:








    Results (459 votes), past polls