Created
June 1, 2021 13:56
-
-
Save patrickbkr/0822bb608f383e903897b4ea1ef7ccab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"SELECT mv.* FROM ModuleVersion mv INNER JOIN | |
( | |
SELECT majorversion AS majver, minorversion AS minver | |
FROM ModuleVersion inner_mv | |
JOIN Module inner_m | |
ON inner_mv.moduleId = inner_m.id | |
AND inner_m.name = :module | |
WHERE inner_mv." + $calcType.getDBColumnName() + " = 1 | |
ORDER BY majorversion DESC, minorversion DESC | |
LIMIT 1 | |
) other | |
ON mv.majorversion = other.majver AND mv.minorversion = other.minver | |
JOIN Module m | |
ON mv.moduleId = m.id | |
AND m.name = :module" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment