- fixed creation of dump file

This commit is contained in:
steinm 2012-07-06 10:03:25 +00:00
parent e704adab00
commit d9f83a155d

View File

@ -47,11 +47,13 @@ foreach ($tables as $table){
foreach ($records as $record){
$values="";
for ($i=0;$i<(count($record)/2);$i++){
if (is_numeric($record[$i])) $values .= $record[$i];
else $values .= "'".$record[$i]."'";
$i = 1;
foreach ($record as $column) {
if (is_numeric($column)) $values .= $column;
else $values .= "'".$column."'";
if ($i<(count($record)/2-1)) $values .= ",";
if ($i<(count($record))) $values .= ",";
$i++;
}
fwrite($h, "INSERT INTO " . $table . " VALUES (" . $values . ");\n");