I have an application that can have a variable argument count so I have to assemble the query myself each time it runs. This instance uses a select statement.
I want to split the SQL to protect against insertion attacks so I have been using this:
my $sth = $dbh->prepare( $sql );
$sth->execute( $bar, $baz );
I am having trouble with the execute() subroutine. I don't know how to properly pass only the arguments that are needed / were supplied to the program. I see there is an execute_array subroutive and I'm not sure if that offers help. The documentation's example is unfortunately above my head. :(
Thank you monks. Long time no see.