hi priya,
thank you for your response,

your help is precious to me as i am very new to sql and rails.

1)i used "name" instead streams.name but still the same error i am seeing.like:

Column 'name' in field list is ambiguous: SELECT name FROM `streams`
streams inner join tags as t on
          stream.id=t.id WHERE (name LIKE '%mpeg2%' or resolution LIKE 
'%mpeg2%' or
          codecname LIKE '%mpeg2%' or framerate LIKE '%mpeg2%' or tags LIKE
'%mpeg2%' or t.name LIKE '%mpeg2%')

and my query is do we need to mention all parameters in query when we
are trying to access the streams table data using tagname?
and do we need to change anywhere in the controller to get the all the
taglist in to tags.

:e.g if we are using single table in controller we use:
@Streams = Stream.find(:all) in index class
now sterams contain all the streams details.

do we need to do the same for tag table also before collecting the
data from streams table?
give me some idea how to do the search using tagname?

thanks alot
sriaknth

On Thu, Dec 11, 2008 at 9:53 AM, Priya Buvan
<[EMAIL PROTECTED]> wrote:
>
> @stream = Stream.find(:all, :joins => "streams as s inner join tags as t
> on
> s.id=t.id", :conditions => ['s.name LIKE ? or s.resolution LIKE ? or
> s.codecname LIKE ? or s.framerate LIKE ? or s.tags LIKE ? or t.name LIKE
> ?',
> '%'+params[:search_text]+'%','%'+params[:search_text]+'%','%'+params[:search_text]+'%',
> '%'+params[:search_text]+'%','%'+params[:search_text]+'%','%'+params[:search_text]+'%'],
> :select => "name")
>
>
>
> SELECT streams.name FROM `streams` .
> In this no need to give streams.name, so repalce streams.name by just
> "name". Just try above query
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

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