fix query for supporters

This commit is contained in:
differentreality 2013-07-12 20:57:57 +03:00
parent 84d30e13f0
commit 76614b858c

View file

@ -24,7 +24,11 @@ class Admin::StatsController < ApplicationController
end
def reg_support(level)
Registration.find_by_sql("select supporter_registrations.* FROM registrations, supporter_registrations, supporter_levels WHERE registrations.id = supporter_registrations.registration_id AND registrations.conference_id = #{@conference.id} AND supporter_registrations.supporter_level_id = #{level.id}")
Registration.find_by_sql("select supporter_registrations.*
FROM registrations INNER JOIN supporter_registrations
ON registrations.id = supporter_registrations.registration_id
WHERE registrations.conference_id = #{@conference.id}
AND supporter_registrations.supporter_level_id = #{level.id}")
end
def speaker_reg(speaker)