List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:July 27 2001 1:51pm
Subject:Re: quoting
View as plain text  
Raul Dias wrote:

> I liked the challenge 8) 
> 
> my $stmt = "INSERT INTO table SET " . 
>   join (", ", 
>     map{ 
>       "$col_names[$_]=" . $dbh->quote($col_values[$_]) 
>     } (0..$#col_names)
>   );
> my $sth = $dbh->do($stmt);


That works, if all arguments are strings. It doesn't
for mixed types. (It probably does for MySQL, but not
for other databases.)


Thread
quotingRaul Dias24 Jul
  • Re: quotingDodger24 Jul
    • Re: quotingChristopher Hicks25 Jul
      • Re: quotingJochen Wiedmann26 Jul
Re: quotingRaul Dias27 Jul
  • Re: quotingDodger27 Jul
  • Re: quotingJochen Wiedmann27 Jul
Re: quotingRaul Dias27 Jul
  • Re: quotingJochen Wiedmann27 Jul
  • Re: quotingDodger27 Jul