in reply to named placeholders in DBI

VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) ... you'll never count question-marks again!

Having a greedy everything-slurping placeholder helps too. Imagine you could use "(??)" to mean "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )". Wouldn't that be great? See DBIx::Simple.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Replies are listed 'Best First'.
Re: Re: named placeholders in DBI
by Jenda (Abbot) on Sep 25, 2003 at 12:55 UTC

    Most of the time I use this:

    $db->prepare('EXEC ImportLocale '. join(', ',('?') x 6));

    Jenda
    Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
       -- Rick Osborne

    Edit by castaway: Closed small tag in signature