Hello,
I am trying to build a high score list of 5 entries per game level,
but with only at most 1 entry per player per level. The following did
not work:
    @levels = Level.find(:all, :select => ''distinct
user_id'', :include
=> [:user],  :conditions => ["level_number = ?",
params[:level]], :order => "moves, time", :limit => 5)
User_id is the column that identifies each player in the db. A player
can have many entries per level (all games are saved), but I only want
to show each person once on the list.
Thanks,
n
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---