in reply to Re: Perl DBI update tables
in thread Perl DBI update tables

"... what is the assignment for $activate_info?"

++ That's a very valid point.

In my response, I assumed that was selecting the 15 columns named in the INSERT statement (source_code, ..., push). I then removed the 3 elements from @activate_results for which placeholders did not exist (i.e. the indices 2, 5 & 7) creating the array slice. That could be an incorrect assumption on my part.

— Ken

Replies are listed 'Best First'.
Re^3: Perl DBI update tables
by cbtshare (Monk) on Dec 07, 2016 at 01:17 UTC
    true, but I am selecting 15 values, I am not sure where its getting 12 from

      You wrote:

      "... I am selecting 15 values, I am not sure where its getting 12 from"

      After I wrote:

      "... I assumed that was selecting the 15 columns ... I then removed the 3 elements ... for which placeholders did not exist ..."
      15 - 3 = 12

      But you don't even need that simple arithmetic: simply count the placeholders in the VALUES clause of your INSERT statement.

      I suspect you're missing something very fundamental: maybe a lack of knowledge or understanding. Perhaps revisit DBI; in particular, the "Placeholders and Bind Values" section.

      — Ken