Skip to content

Commit

Permalink
[DQT Importer] Issue where script breaks if scantype has a '-' charac…
Browse files Browse the repository at this point in the history
…ter (#5841)

Add backticks to make sure no errors are thrown if these are dashes in the scan type name
  • Loading branch information
ridz1208 authored and driusan committed Dec 13, 2019
1 parent da04429 commit 0b8546d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/CouchDB_MRI_Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ function _generateCandidatesQuery($ScanTypes)
$Query .= ", (SELECT f.File FROM files f LEFT JOIN mri_scan_type msc
ON (msc.ID= f.AcquisitionProtocolID)
WHERE f.SessionID=s.ID AND msc.Scan_type='$scantype' LIMIT 1)
as Selected_$scantype, (SELECT fqc.QCStatus
as `Selected_$scantype`, (SELECT fqc.QCStatus
FROM files f
LEFT JOIN files_qcstatus fqc USING(FileID)
LEFT JOIN mri_scan_type msc ON(msc.ID= f.AcquisitionProtocolID)
WHERE f.SessionID=s.ID AND msc.Scan_type='$scantype' LIMIT 1)
as $scantype"."_QCStatus";
as `$scantype"."_QCStatus`";
}
$Query .= " FROM session s JOIN candidate c USING (CandID)
LEFT JOIN feedback_mri_comments fmric
Expand Down

0 comments on commit 0b8546d

Please sign in to comment.