Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
PostgreSQL (or rather, DBD::Pg) allows dollar notation too, so you can re-use those. (Must start at $1, but can be used in any order in the query), see DBD::Pg docs, under 'placeholders'. I normally set $dbh->{pg_placeholder_dollaronly} property so I don't start using the questionable question mark. (Of course, if your SQL is submitted to other DBMS than (just) postgres, you'll have to think of something else) edit: Oh, I see you're also the last_insert_id guy. That means you're mucking around with a lesser db than PostgreSQL and that the above should be ignored till you upgrade to the better system In reply to Re: Reusing placeholders
by erix
|
|