Often you get information from another source where the number of elements
is variable so it isn't known when you write the script.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.
----- Original Message -----
From: "Terrence Brannon" <[EMAIL PROTECTED]>
To: "Tony Vassilev" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 16, 2015 10:59
Subject: Re: arbitrary number of bindings & LIKE statement
>
> On Wednesday, January 16, 2002, at 07:54 AM, Tony Vassilev wrote:
> >
> > That method of course requires that I know the number of bindings
> > ocurring.
> > For an arbitrary number, I've been trying this:
> >
> > my $sth = $dbh->prepare($sql) || die "couldn't prepate";
> > foreach $x (0..$#names) {
> > $sth->bind_param($x+1, "%$names[$x]%");
> > }
> > $sth->execute || die "error couldn't execute";
> >
>
> Why is the number of bindings arbitrary?