Created
July 2, 2009 15:12
-
-
Save mlooney/139515 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mgr_sum_for_affiliate_for_month(affiliate, m=Date.today) | |
ImporterData.count_by_sql(['select sum(field_number_value) from importer_datas where (field_name = ? and poker_room_id=? and member_id=?) and (created_at < ? and created_at > ?)', 'MGR', affiliate.id, self.id, m.end_of_month, m.beginning_of_month]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment