WHAT THE FUCK IS THIS SHIT
:select => "votes.id, votes.giveaway, votes.confirmed, votes.event_id, votes.user_id, votes.by_all_star, (select count(v2.created_at) from votes v2 join events ON (events.id = v2.event_id) where v2.user_id = votes.user_id and events.begin_date > '#{Date.today.to_s(:db)}') AS count_voted_upcoming, (select max(events.begin_date) from votes v3 join events ON (events.id = v3.event_id) where v3.user_id=votes.user_id and v3.giveaway = 1) as last_win"
Loading comments…
Comments