Skip to content

Commit

Permalink
Update syntax of join
Browse files Browse the repository at this point in the history
  • Loading branch information
skarya22 committed Dec 13, 2024
1 parent e801021 commit 13a5ddb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion php/libraries/Utility.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ class Utility
} elseif (!is_null($commentID)) { //get sourcefield using commentid
$instrument = $DB->pselectOne(
"SELECT Test_name FROM flag
JOIN test_names ON test_names.ID = flag.TestID
JOIN test_names ON (test_names.ID = flag.TestID)
WHERE CommentID = :cid",
['cid' => $commentID]
);
Expand Down
2 changes: 1 addition & 1 deletion tools/data_integrity/data_deletion/delete_timepoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function deleteTimepoint(
$instruments = $DB->pselect(
'SELECT Test_name, CommentID
FROM flag
JOIN test_names ON test_names.ID = flag.TestID
JOIN test_names ON (test_names.ID = flag.TestID)
WHERE SessionID=:sid',
['sid' => $sessionID]
);
Expand Down
8 changes: 4 additions & 4 deletions tools/data_integrity_check.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
LEFT JOIN
test_names
ON
test_names.ID = flag.TestID
(test_names.ID = flag.TestID)
WHERE
Test_name = :instrument AND
{$instrument}.CommentID IS NULL
Expand Down Expand Up @@ -87,7 +87,7 @@
JOIN
test_names
ON
test_names.ID = flag.TestID
(test_names.ID = flag.TestID)
WHERE
(
flag.CommentID NOT LIKE 'DDE_%' AND
Expand All @@ -99,7 +99,7 @@
JOIN
test_names
ON
test_names.ID = flag.TestID
(test_names.ID = flag.TestID)
WHERE
test.CommentID NOT LIKE 'DDE_%' AND
flag.SessionID = test.SessionID AND
Expand All @@ -116,7 +116,7 @@
JOIN
test_names
ON
test_names.ID = flag.TestID
(test_names.ID = flag.TestID)
WHERE
test.CommentID LIKE 'DDE_%' AND
flag.SessionID = test.SessionID AND
Expand Down
2 changes: 1 addition & 1 deletion tools/fix_timepoint_date_problems.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ function addInstrument($sessionID, $testName, $loris)

// get CommentID of the newly assigned instrument
$query = "SELECT CommentID FROM flag
JOIN test_names ON test_names.ID = flag.TestID
JOIN test_names ON (test_names.ID = flag.TestID)
WHERE SessionID='$sessionID'
AND Test_name='$testName'";

Expand Down

0 comments on commit 13a5ddb

Please sign in to comment.