Skip to content

Commit

Permalink
Fix bug in insert method
Browse files Browse the repository at this point in the history
Missing the last comma in the insert method
  • Loading branch information
inoveaconseil committed May 19, 2017
1 parent c18c401 commit 035cae6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev/skeletons/build_class_from_table.php
Expand Up @@ -251,7 +251,7 @@
$i=0;
foreach($property as $key => $prop)
{
$i++;

$addfield=1;
if ($prop['field'] == 'tms') $addfield=0; // This is a field of type timestamp edited automatically
if ($prop['extra'] == 'auto_increment') $addfield=0;
Expand All @@ -263,6 +263,7 @@
$varprop.="';";
$varprop.="\n";
}
$i++;
}
$targetcontent=preg_replace('/\$sql \.= \' field1,\';/', $varprop, $targetcontent);
$targetcontent=preg_replace('/\$sql \.= \' field2\';/', '', $targetcontent);
Expand Down

0 comments on commit 035cae6

Please sign in to comment.