2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Fix sample import given new database structure (sample_var table)

Fix typo in import.php
This commit is contained in:
Adam Zammit
2015-08-07 14:07:34 +10:00
2 changed files with 8 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ if (isset($_POST['import_form']))
} }
else else
{ {
print -"<div class='alert alert-danger col-md-offset-2'><p>" . T_("Error importing file. Please try again") . "</p></div>"; print "<div class='alert alert-danger col-md-offset-2'><p>" . T_("Error importing file. Please try again") . "</p></div>";
} }
} }
else else

View File

@@ -305,6 +305,7 @@ function import_file($file, $description, $fields, $firstrow = 2)
VALUES (NULL,'$id','$tzone','$dppid')"; VALUES (NULL,'$id','$tzone','$dppid')";
$db->Execute($sql); $db->Execute($sql);
$sid = $db->Insert_Id(); $sid = $db->Insert_Id();
@@ -315,8 +316,8 @@ function import_file($file, $description, $fields, $firstrow = 2)
{ {
$dkey = $db->Quote($data[$key - 1]); $dkey = $db->Quote($data[$key - 1]);
$sql = "INSERT INTO sample_var (sample_id,var_id,var,val,type) $sql = "INSERT INTO sample_var (sample_id,var_id,val)
VALUES ('$sid','{$sirv_id[$key]}','$val',{$dkey},'{$selected_type[$key]}')"; VALUES ('$sid','{$sirv_id[$key]}',{$dkey})";
$db->Execute($sql); $db->Execute($sql);