Re: Use one variable for multiple binds

Re: Use one variable for multiple binds

am 13.09.2004 09:34:35 von Jochen Wiedmann

Newbedford.net wrote:
> I dont know if this is possible.
> when calling execute with one variable that holds multiple placeholders.
>
> Similar to this.
> $dbh->execute($variable)
> the $variable holds multiple values ie..
> $variable="bindinfo1,bindinfo2"

Hopefully, this will never be the case. IMO, it is completely up to you,
to implement the logic, if, and when, to apply something as simple as

my @vars;
if (hasMultipleVars($variable)) {
@vars = split(/,/, $variable);
} else {
@vars = ($variable);
}

If you disagree, I'd be interested to learn, how you suggest the drivers
implementation of hasMultipleVars($variable).

Jochen

--
http://lilypie.com/baby1/050423/1/5/1/+1

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Use one variable for multiple binds

am 13.09.2004 09:34:35 von Jochen Wiedmann

Newbedford.net wrote:
> I dont know if this is possible.
> when calling execute with one variable that holds multiple placeholders.
>
> Similar to this.
> $dbh->execute($variable)
> the $variable holds multiple values ie..
> $variable="bindinfo1,bindinfo2"

Hopefully, this will never be the case. IMO, it is completely up to you,
to implement the logic, if, and when, to apply something as simple as

my @vars;
if (hasMultipleVars($variable)) {
@vars = split(/,/, $variable);
} else {
@vars = ($variable);
}

If you disagree, I'd be interested to learn, how you suggest the drivers
implementation of hasMultipleVars($variable).

Jochen

--
http://lilypie.com/baby1/050423/1/5/1/+1

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Use one variable for multiple binds

am 13.09.2004 10:54:00 von art

--bound1095065640
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I dont know if this is possible.
when calling execute with one variable that holds multiple placeholders.

Similar to this.
$dbh->execute($variable)
the $variable holds multiple values ie..
$variable="bindinfo1,bindinfo2"

My problem is mysql expects 2 bind variables ie.. $dbh->execute($variable1,$variable2)

I am trying to select when not knowing the number of requisites.

Hoping is something small I am overlooking.

Thank you for any help you can give me
Arthur



--bound1095065640
Content-Type: text/plain; charset=us-ascii

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
--bound1095065640--

Re: Use one variable for multiple binds

am 13.09.2004 19:38:58 von art

--bound1095097138
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Solution was as simple as i had hoped
Use array when calling execute
Many Thnaks to all that helped
Arthur


--bound1095097138
Content-Type: text/plain; charset=us-ascii

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
--bound1095097138--

Re: Use one variable for multiple binds

am 13.09.2004 19:38:58 von art

--bound1095097138
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Solution was as simple as i had hoped
Use array when calling execute
Many Thnaks to all that helped
Arthur


--bound1095097138
Content-Type: text/plain; charset=us-ascii

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org
--bound1095097138--