Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: DBI recipes

by polettix (Vicar)
on Aug 26, 2006 at 00:01 UTC ( #569756=note: print w/ replies, xml ) Need Help??

in reply to DBI recipes

Regarding the automatic construction of the placeholder list when dealing with insertions:

# ... my @fields = (qw(id name salary)); my $fieldlist = join ", ", @fields; my $field_placeholders = join ", ", map {'?'} @fields;
I personally prefer to avoid the map and play with the repetition operator:
my field_placeholders = join ', ', ('?') x @fields;
But I don't really know if this operator was available back in 2003 :)

perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Comment on Re: DBI recipes
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2015-11-29 07:44 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (748 votes), past polls