Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

by igelkott (Priest)
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).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://686282]
[Your Mother]: That was for LanX, not you. For you: TERRIBLE!!!!
[Your Mother]: Moral: Be more like LanX.
[shmem]: what nicety is next?
[shmem]: pardon me, I chimed in too late
[Your Mother]: shmem is also quite well. The rest of you, horrible!!!!

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-03-19 20:34 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.