isn't it just
User.count(:conditions => {:sex => 'female'})
syntax may be a bit wrong, but you should be able to google to sort it out.

Simon


On Mon, 06 Apr 2009 07:10:11 +0800, Morgan Morgan 
<[email protected]> wrote:

>
> so i have a database filled with stats and i need to return a number
> from those stats for processing.  how would i go about counting how many
> of a certian thing there are in a particular column..
>
> example: say i wanted to see how many records showed female in the users
> table but i didn't actually want to pull a bunch of info, i just want
> the number returned.
>
> thanks..  i hope this makes sense.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to