ok, here is my question, how can i select only one or two, three… etc
fields from a sentence, for example, i only want to know the id, name
from de User model
User.find(:first, :condiions => [“id = ?”, @id])
how can i specify what fields i want??
ok, here is my question, how can i select only one or two, three… etc
fields from a sentence, for example, i only want to know the id, name
from de User model
User.find(:first, :condiions => [“id = ?”, @id])
how can i specify what fields i want??
On May 9, 2006, at 10:33 AM, sergio luis wrote:
ok, here is my question, how can i select only one or two, three… etc
fields from a sentence, for example, i only want to know the id, name
from de User modelUser.find(:first, :condiions => [“id = ?”, @id])
how can i specify what fields i want??
Please refer to the API docs:
Peak Obsession
Also, be mindful that the forum is mirrored to a mailing list -
“throwaway” questions really gum up the works.
Thanks,
jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs