Re: AW: how to allow variable number of argumets in mysql insert quer y

fungazid <[email protected]> Tue, 18 Dec 2007 13:35:10 -0800 (PST)
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
My man,

Maybe you are partly right, 
anyway I sloved my problem !!!!!!!!!!!!!!!!!
It is working fine
The solution is simple:

 ______________________________
for(my $i=1; $i< $size; $i++)
 {
        $str=$str.',$args['.$i.']';
 }
 my $str2='$q->execute('.$str.') or die "Couldn\'t execute statement: " .
$q->errstr';
 eval $str2 or die "error!!!\n"; 
_______________________________


Thank you good people


Baron Schwartz-2 wrote:
> 
> On Dec 18, 2007 2:53 PM, fungazid <[email protected]> wrote:
>>
>> Thanks you a lot men,
>>
>> I think that do() is slower then prepare()  + execute() (if you need to
>> call
>> execute multiple times). This is the first problem I have with your
>> solutions.
>> Secondly, the tables I'm using have 100-400 columns! so the idea of
>> concatenating a string of 300 values and to input this directly into a
>> function can be a problem.
>> What I need is a way to translate a string into a perl code during
>> run-time
>> (if there is a way).
> 
> There definitely is, but it sounds like you need to read Higher-Order
> Perl before you get into trouble :-)
> 
> -- 
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:    http://lists.mysql.com/[email protected]
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/AW%3A-how-to-allow-variable-number-of-argumets-in-mysql-insert-quer-y-tp14403577p14406265.html
Sent from the MySQL - Perl mailing list archive at Nabble.com.


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]