Fixed uppercase in SQL. =)
This commit is contained in:
parent
53aae7fec2
commit
e0dc02a027
|
@ -8,15 +8,15 @@ SELECT record_maps.map, category, points, stars, mappers, release, width, height
|
|||
AND ($6::TIMESTAMP IS NULL OR release <= $6)
|
||||
AND (ARRAY_LENGTH(ARRAY[]::TEXT[], 1) > 0 IS TRUE OR $7::TEXT[] <@ tiles::TEXT[])
|
||||
ORDER BY -- what in the flying fuck
|
||||
(case when lower($8) = 'map' and lower($9) = 'asc' then record_maps.map end) asc,
|
||||
(case when lower($8) = 'map' and lower($9) = 'desc' then record_maps.map end) desc,
|
||||
(case when lower($8) = 'category' and lower($9) = 'asc' then category end) asc,
|
||||
(case when lower($8) = 'category' and lower($9) = 'desc' then category end) desc,
|
||||
(case when lower($8) = 'points' and lower($9) = 'asc' then points::INTEGER end) asc,
|
||||
(case when lower($8) = 'points' and lower($9) = 'desc' then points::INTEGER end) desc,
|
||||
(case when lower($8) = 'stars' and lower($9) = 'asc' then stars::INTEGER end) asc,
|
||||
(case when lower($8) = 'stars' and lower($9) = 'desc' then stars::INTEGER end) desc,
|
||||
(case when lower($8) = 'width' and lower($9) = 'asc' then width::INTEGER end) asc,
|
||||
(case when lower($8) = 'width' and lower($9) = 'desc' then width::INTEGER end) desc,
|
||||
(case when lower($8) = 'height' and lower($9) = 'asc' then height::INTEGER end) asc,
|
||||
(case when lower($8) = 'height' and lower($9) = 'desc' then height::INTEGER end) desc
|
||||
(CASE WHEN lower($8) = 'map' AND lower($9) = 'asc' THEN record_maps.map END) ASC,
|
||||
(CASE WHEN lower($8) = 'map' AND lower($9) = 'desc' THEN record_maps.map END) DESC,
|
||||
(CASE WHEN lower($8) = 'category' AND lower($9) = 'asc' THEN category END) ASC,
|
||||
(CASE WHEN lower($8) = 'category' AND lower($9) = 'desc' THEN category END) DESC,
|
||||
(CASE WHEN lower($8) = 'points' AND lower($9) = 'asc' THEN points::INTEGER END) ASC,
|
||||
(CASE WHEN lower($8) = 'points' AND lower($9) = 'desc' THEN points::INTEGER END) DESC,
|
||||
(CASE WHEN lower($8) = 'stars' AND lower($9) = 'asc' THEN stars::INTEGER END) ASC,
|
||||
(CASE WHEN lower($8) = 'stars' AND lower($9) = 'desc' THEN stars::INTEGER END) DESC,
|
||||
(CASE WHEN lower($8) = 'width' AND lower($9) = 'asc' THEN width::INTEGER END) ASC,
|
||||
(CASE WHEN lower($8) = 'width' AND lower($9) = 'desc' THEN width::INTEGER END) DESC,
|
||||
(CASE WHEN lower($8) = 'height' AND lower($9) = 'asc' THEN height::INTEGER END) ASC,
|
||||
(CASE WHEN lower($8) = 'height' AND lower($9) = 'desc' THEN height::INTEGER END) DESC
|
Loading…
Reference in New Issue
Block a user