LinHES Forums
http://forum.linhes.org/

Customized mythweb canned searches
http://forum.linhes.org/viewtopic.php?f=6&t=8054
Page 1 of 1

Author:  tomes [ Mon Jan 23, 2006 1:51 pm ]
Post subject:  Customized mythweb canned searches

I figured out that I can create new canned searches by modifying canned_searches.php. I'd like to search for movies on HBO channels only. I'm at a loss on how to do perform a search only on specific channels. I searched the forums and did not see anything on creating customized searches. Can someone either give me a hint or let me know where else to look? Is the database structure documented somewhere?

Thanks.

Author:  tomes [ Mon Jan 23, 2006 2:23 pm ]
Post subject: 

I messed around some more and I can accomplish what I want by doing the following:

=> "category_type'".movie_word."' AND program.channid LIKE '1310' OR program.chanid LIKE '1311' OR program.chanid LIKE ...

I can just put a bunch of OR values in and accomplish what I want, but is there a better way?

Thanks.

Author:  MisoSoup777 [ Mon Jan 23, 2006 2:56 pm ]
Post subject: 

First, you typically want to avoid "LIKE" searches unless you're dealing with certain types of fields as they don't perform as well.

Try changing to:

Code:
"category_type'".movie_word."' AND program.chanid IN (1310,1311,1312,etc...)


Take out the etc... of course and replace with as many values as necessary.

It's easier to manage.


tomes wrote:
I messed around some more and I can accomplish what I want by doing the following:

=> "category_type'".movie_word."' AND program.channid LIKE '1310' OR program.chanid LIKE '1311' OR program.chanid LIKE ...

I can just put a bunch of OR values in and accomplish what I want, but is there a better way?

Thanks.
Code:

Author:  tomes [ Tue Jan 24, 2006 8:15 am ]
Post subject: 

Thanks for the information. It's a much cleaner way to do what I wanted. I did need to put tick marks around each channel to make it work properly.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/