Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Answer: What are placeholders in DBI, and why would I want to use them?

( #267178=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > What are placeholders in DBI, and why would I want to use them? contributed by DrHyde

Be aware that there are some places where you can't use placeholders, even if your DBD supports them. The two which I hit most often are that you can't use a placeholder for a table name; and that you can't use placeholders for variable-length WHERE IN('foo', 'bar', 'baz') constructs. Another I have come across less often is the multiple-record INSERT variation.

This is because all of those alter the structure of the query, as opposed to just plugging different constant values into the same query.

Comment on Answer: What are placeholders in DBI, and why would I want to use them?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2014-07-10 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (212 votes), past polls