in reply to Re: DBI, MAP Help!
in thread DBI, MAP Help!

For IN clauses (especially that many IN clauses), if there are variable numbers of parameters, and especially if the statement (with the fixed number of parameters) is not reused, I wouldn't bother with placeholders. The DBI quote() method is fine.

And I disagree about the !Perl but SQL issue. It was a Perl/SQL issue IMHO.

Replies are listed 'Best First'.
Re^3: DBI, MAP Help!
by kennethk (Abbot) on Apr 30, 2009 at 21:36 UTC
    Yeah, my language is a little strong. I agree that quote is fine for a single use query, but I think that in the best case scenarios they tie and in worst cases placeholders fare dramatically better, so they should be in a programmer's arsenal. I also think that performing the N^M queries necessary to do this as a series of one-offs is unnecessary abuse of a database when 1 straight forward query will do.

    In any case, TIMTOWTDI and best practice can mean ignoring Best Practice.