Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: DBI recipes

by polettix (Vicar)
on Aug 25, 2006 at 20: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 :)

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

Don't fool yourself.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2019-08-26 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?