i have one query, which gives the correct output in query browser. * @getquery = Cname.select("cnames.name").where(''skills.rate= ? AND skills.skill= ?'',3,@searchstring).joins(''JOIN skills ON cnames.id = skills.company_id'')* * *when i print the @getquery, it gives #<Cname:0x00000003f511f0> #<Cname:0x00000003e8aa28>* * * * *how to get the name from this **@getquery?* * * *Thanks* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/jOkhN4UPzO8J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
@getquery.name -- Oscar Del Ben Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, June 25, 2012 at 8:15 AM, amruby wrote:> i have one query, which gives the correct output in query browser. > > @getquery = Cname.select("cnames.name (http://cnames.name)").where(''skills.rate= ? AND skills.skill= ?'',3,@searchstring).joins(''JOIN skills ON cnames.id = skills.company_id'') > when i print the @getquery, it gives > > #<Cname:0x00000003f511f0> > #<Cname:0x00000003e8aa28> > > how to get the name from this @getquery? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/jOkhN4UPzO8J. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Monday, 25 June 2012 20:51:53 UTC+5:30, Oscar Del Ben wrote:> > @getquery.name > >Thanks..... that time @getquery.name gives the output *Cname*> -- > Oscar Del Ben > Sent with Sparrow <http://www.sparrowmailapp.com/?sig> > > On Monday, June 25, 2012 at 8:15 AM, amruby wrote: > > i have one query, which gives the correct output in query browser. > > * @getquery = Cname.select("cnames.name").where(''skills.rate= ? AND > skills.skill= ?'',3,@searchstring).joins(''JOIN skills ON cnames.id = > skills.company_id'')* > * *when i print the @getquery, it gives > > #<Cname:0x00000003f511f0> > #<Cname:0x00000003e8aa28>* * > * > * > *how to get the name from this **@getquery?* > * > * > *Thanks* > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/jOkhN4UPzO8J. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/SOEx_ETf6rcJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Monday, 25 June 2012 20:56:45 UTC+5:30, amruby wrote:> > > > On Monday, 25 June 2012 20:51:53 UTC+5:30, Oscar Del Ben wrote: >> >> @getquery.name >> >> > >Got the result> Thanks..... > that time @getquery.name gives the output > > *Cname* > >> -- >> Oscar Del Ben >> Sent with Sparrow <http://www.sparrowmailapp.com/?sig> >> >> On Monday, June 25, 2012 at 8:15 AM, amruby wrote: >> >> i have one query, which gives the correct output in query browser. >> >> * @getquery = Cname.select("cnames.name").where(''skills.rate= ? AND >> skills.skill= ?'',3,@searchstring).joins(''JOIN skills ON cnames.id = >> skills.company_id'')* >> * *when i print the @getquery, it gives >> >> #<Cname:0x00000003f511f0> >> #<Cname:0x00000003e8aa28>* * >> * >> * >> *how to get the name from this **@getquery?* >> * >> * >> *Thanks* >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/jOkhN4UPzO8J. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/CG3USlsVAcYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.