Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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 :)

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?
[stevieb]: It seems as though some Strawberry Perl downloads have incorrect checksums all of a sudden. Could someone please download http://strawberryp erl.com/download/5 .12.3.0/strawberry -perl-5.12.3.0- portable.zip and do an sha1sum on...
[stevieb]: ...it? I'm getting 309ad7a9ba74614fcd 0c65bff7ea4400c10f a92f, but the http://strawberryp erl.com/releases. html states 0e267fc2cf5a16126d a6f9520cc7664db63d 2b57 and want to ensure it's not just me
[stevieb]: ...or the proper download link and release page even...
[pryrt]: da39a3ee5e6b4b0d32 55bfef95601890afd8 0709 *strawberry-perl-5 .12.3.0-portable. zip
[pryrt]: matches neither. :-)
[stevieb]: wtf!? lol
[stevieb]: I'm checking some other versions. This is a little frightening
[pryrt]: Sorry, my bad: it was't done downloading when I did the sha1sum... now I match your 309ad... value

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2017-03-29 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (353 votes). Check out past polls.