Well, I knew it was obvious ;-). Thanks!
Scott On Thu, May 21, 2009 at 8:14 AM, Jeremy Evans <[email protected]>wrote: > > On May 21, 7:27 am, Scott LaBounty <[email protected]> wrote: > > I'm thinking I must be missing something obvious here but ... I'm trying > to > > get only specific columns from a table. When I do this: > > > > @users = DB[:users] > > > > I get exactly what I expect, all users with all columns. When I do this: > > > > @users = DB[:users].select[:first_name, :last_name, :user_name] > > > > I'd expect to get all of the same users, but just the three columns, but > it > > seems like I don't get anything. > > > > So ... what am I missing? > > You are using [] instead of (): > > @users = DB[:users].select(:first_name, :last_name, :user_name) > > Jeremy > > > -- Scott http://steamcode.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
