Skip to content

Commit

Permalink
fix esacepe
Browse files Browse the repository at this point in the history
  • Loading branch information
mihailShumilov committed Feb 1, 2015
1 parent b117f91 commit 9175f04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Convertor.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,16 @@ private function end($parser, $name)
$this->tableData = false;
break;
case "row":
array_walk( $this->row, function ( &$item, $key ) {
$item = str_replace( "'", "''", $item );
} );
fwrite(
$this->oFh,
"INSERT INTO {$this->lastTable} (\"" . join(
"\",\"",
array_keys($this->row)
) . "\") VALUES (E'" . join(
"',E'",
) . "\") VALUES ('" . join(
"','",
$this->row
) . "');\n"
);
Expand Down

0 comments on commit 9175f04

Please sign in to comment.