Explorar el Código

Fixed SQL error

tags/last-sinatra-version
Adrian Short hace 14 años
padre
commit
d650b70ba3
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. +6
    -1
      app.rb

+ 6
- 1
app.rb Ver fichero

@@ -34,10 +34,15 @@ get '/' do
WHERE p.id = c.party_id
GROUP BY p.id
GROUP BY p.name
ORDER BY votes desc
;")

select p.name, count(c.*) AS seats
FROM parties p, councilcandidates c
GROUP BY p.id

@total_votes = Councilcandidate.sum(:votes_2010)


Cargando…
Cancelar
Guardar