in reply to Re^5: DBI, place holders and CGI forms
in thread DBI, place holders and CGI forms

So the advice works great for selects, I'm now thinking about how can I do this with insert statements, the same idea, I don't know what columns have been submitted. Will the same idea work here?

Replies are listed 'Best First'.
Re^7: DBI, place holders and CGI forms
by mje (Curate) on Jun 17, 2011 at 14:58 UTC

    Which idea are you referring to?

      Your select advice -
      select col1, col2, col3 from tab_name where (? is null or foo = ?) a +nd (? is null or bar = ?) and (? is null or baz = ?)
      .

        I don't see how this applies to inserts. Provide an example of what you are trying to do.