in reply to Re: bind variables with array
in thread bind variables with array

Thanks yes that was just a rough example , I found my problem !! If you call execute(()); that is with a blank array you get an error so I had to put in a check to prevent it getting called when no placeholders are passed in
my $res = (defined @$vars) ? $sth->execute(@$vars) : $sth->execute;

Thanks for the pointer to the docs looks like execute(@) justs calls bind_param() for each value in the array so it does work.