On Thu, 24 Oct 2002 12:56:20 -0700 David Wheeler <[EMAIL PROTECTED]> wrote:
> On Thursday, October 24, 2002, at 12:52 PM, Rudy Lippan wrote:
>
> > Because the loop looked something like:
> >
> > for (qw(this is a test)) {
> > $data .= $dbi->quote($_);
> > }
> >
> > so you would end up with: 'this''is''a''test', and since '' is just an
> > escaped qoute, q{this'is'a'test} gets inserted into the db.
>
> Oh, duh. The proper solution then should have been:
>
> while (my $rd = read $fh, $data2, 65536) {
> $data .= $data2;
> $datasize += $rd;
> }
> $data = $dbh->quote($data);
I don't want to seem inhospitable, but this looks like it really belongs in
dbi-users instead of dbi-dev..
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.