Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: Can a DBI Placeholder accept multiple values?

by igelkott (Curate)
on May 13, 2008 at 14:45 UTC ( #686282=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Can a DBI Placeholder accept multiple values?
in thread Can a DBI Placeholder accept multiple values?

You would need to replace (?) with the number of array elements

Yes, the number of (comma-delimited) "?" must equal the number of values to be inserted but the $val .= "?,"; you wrote here would of course end up with an extra comma. There's certainly other ways make this string but that should otherwise work fine.

As noted, the special "??" placeholder of DBIx-Simple eliminates the need to make the need to make this string of "?,?,?..." (as well as other simplifications).


Comment on Re^3: Can a DBI Placeholder accept multiple values?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://686282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (16)
As of 2014-07-25 17:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls