hi priya,
thanks alot its working for me .
and one more query .
i have two tables like:
1)streams table with columns
id name resolution codecname framerate
2)tags table with columns like;
id name
previously i am searching in streams table using any column entry of that table.
And using taggable plugin im joing two tables.
now i want to search the table entries of streams table using the tag name.
eg:
stream table entris
tags table entris
id name resolution codecname framerate
id name
1 dust.mpeg2 1920x1080 mpeg2 30fps
1 mpeg2 1920x1080
2 mummy.264 1920x1080 h264 30fps
2 h264 1920x1080
3 dust.aac na aac na
3 aac
4 amelie.mpeg2 720x480 mpeg2 25fps
4 720x480
now i want to searcg the table streams using tagname;
if i enter tagname 720x480
expected output:amelie.mpeg2
to do this wat are all the things i need to change?
can you give idea on this?
thanks
srikanth
On Wed, Dec 10, 2008 at 4:44 PM, Priya Buvan
<[EMAIL PROTECTED]> wrote:
>
> @stream = Stream.find(:all, :conditions => ['name LIKE ? or resolution
> LIKE ? or codecname LIKE ? or framerate LIKE ? or tags LIKE ?',
> '%'+params[:search_text]+'%','%'+params[:search_text]+'%','%'+params[:search_text]+'%',
> '%'+params[:search_text]+'%','%'+params[:search_text]+'%'])
>
> I checked with this. Its working. I don't know for what you are using
> LOWER here?
> --
> 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
-~----------~----~----~----~------~----~------~--~---