浏览代码

Fixed SQL error

tags/last-sinatra-version
Adrian Short 14 年前
父节点
当前提交
d650b70ba3
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      app.rb

+ 6
- 1
app.rb 查看文件

@@ -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)


正在加载...
取消
保存