On Mar 15, 11:20 am, M I R <[email protected]> wrote:
> find_by_xxx_and_yyy_and_zzz (with as many conditions as you want)
> how will i put the values against xxx, yyy and zzz,
> i am new to rails so please give me an explicit example.
>
There are some examples on 
http://api.rubyonrails.org/classes/ActiveRecord/Base.html

Fred
> On Mar 15, 4:06 pm, Frederick Cheung <[email protected]>
> wrote:
>
>
>
> > On Mar 15, 10:47 am, M I R <[email protected]> wrote:
>
> > > hi,
> > > I have to retrieve data from table with two conditions using a actully
> > > the following query
>
> > > select * from abc where id=1 and type = 'a'
>
> > > how will i do if:
>
> > > find_by_id(id) >>>>> how will i use for multiple conditions
>
> > you can do find_by_xxx_and_yyy_and_zzz (with as many conditions as you
> > want)
>
> > Fred

-- 
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