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);

Sorry about that.

David

--
David Wheeler                                     AIM: dwTheory
[EMAIL PROTECTED]                                 ICQ: 15726394
http://david.wheeler.net/                      Yahoo!: dew7e
                                               Jabber: [EMAIL PROTECTED]

Reply via email to