[mythtv-users] Custom Schedule for Formula One|Formula 1|F1GP

Robert Longbottom rongblor at googlemail.com
Mon Mar 21 10:16:08 UTC 2011



On 21 Mar 2011, at 08:39 AM, Wayne Thomas <waynethomas69 at gmail.com> wrote:

> On Mon, Mar 21, 2011 at 8:04 AM, Nick Rout <nick.rout at gmail.com> wrote:
> On Mon, Mar 21, 2011 at 7:19 PM, David Whyte <david.whyte at gmail.com> wrote:
> > On Mon, Mar 21, 2011 at 4:07 PM, Wayne Thomas <waynethomas69 at gmail.com> wrote:
> >> I use:
> >> (program.title LIKE '%formula 1%'
> >> OR program.title LIKE '%F1%'
> >> OR program.subtitle LIKE '%formula 1%'
> >> OR program.subtitle LIKE '%F1%'
> >> OR program.description LIKE '%formula 1%'
> >> OR program.description LIKE '%F1%')
> >> it does pick up the occasional program that isn't Formula 1 (due to
> >> mentioning F1 in the description) but thats on only 3 or 4 a year and can
> >> easily be ignored (although they can be worth a watch too if you are F1
> >> crazy).
> >
> > Brilliant.  Thanks heaps!
> 
> Actually you might need to include some variations with one instead of
> 1 (unless mysql's 'like' syntax is that clever)
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> 
> Not sure how clever the 'like' is but:
> 
> (program.title LIKE '%formula 1%'
> OR program.title LIKE '%F1%'
> OR program.title LIKE '%formula one%'
> OR program.subtitle LIKE '%formula 1%'
> OR program.subtitle LIKE '%F1%'
> OR program.subtitle LIKE '%formula one%'
> OR program.description LIKE '%formula 1%'
> OR program.description LIKE '%F1%'
> OR program.description LIKE '%formula one%')
> 
> would capture everything.  I don't use it since I have never seen the word used rather than the number.

LIKE isn't "clever" at all. The % symbol is a wildcard, equivalent to * when using say, ls *

Also mysql is case sensitive (I think) so it might be worth converting everything to upper case. I can't remember the mysql command for this, but it's probably something like TO_UPPER. So you'd want something along the lines of:

(TO_UPPER(program.title) LIKE '%F1%')

I must check what I've got later. 

Robert. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20110321/832dc67a/attachment-0001.html 


More information about the mythtv-users mailing list