in reply to DBI Placeholders

if your DB supports it, used named placeholders ( like :DATA )

then build a hash with the keys being the placeholder names ( minus the colon ), and the values being the values to use.

%bound_params = ( DATA => 'foo bar' MORE => 'bazqux' );
and so on. . . and then pass that hash into the execute statement.

Replies are listed 'Best First'.
Re: Re: DBI Placeholders
by voyager (Friar) on Apr 10, 2001 at 05:23 UTC
    if your DB supports it, used named placeholders ( like :DATA )

    Why not learn a db-independent method like the "?" place-holders described above?

      there's no reason to not know both ways of attacking the situation. named parameters ( even placeholders ) make code easier to read, and therefore to maintain.

      if you don't want to do it, no one is forcing anything.