Fix datatypes in query
This commit is contained in:
parent
6ed644d1d0
commit
9283ee0a03
@ -156,7 +156,7 @@ class Handler
|
|||||||
if prefijo.nil? && year.nil?
|
if prefijo.nil? && year.nil?
|
||||||
# Global totals
|
# Global totals
|
||||||
sql = %(
|
sql = %(
|
||||||
SELECT total, nombre
|
SELECT total::integer, nombre
|
||||||
FROM totales
|
FROM totales
|
||||||
ORDER BY total DESC
|
ORDER BY total DESC
|
||||||
LIMIT 50
|
LIMIT 50
|
||||||
@ -164,7 +164,7 @@ class Handler
|
|||||||
elsif prefijo.nil? && !year.nil?
|
elsif prefijo.nil? && !year.nil?
|
||||||
# Per-year totals
|
# Per-year totals
|
||||||
sql = %(
|
sql = %(
|
||||||
SELECT contador, nombre
|
SELECT contador::integer, nombre
|
||||||
FROM nombres
|
FROM nombres
|
||||||
WHERE
|
WHERE
|
||||||
anio = '#{year}'
|
anio = '#{year}'
|
||||||
|
Loading…
Reference in New Issue
Block a user