Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"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