We don't bite newbies here... much | |
PerlMonks |
Re^2: bind variables with arrayby hakkr (Chaplain) |
on Jun 08, 2004 at 11:27 UTC ( [id://362282]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|