Search phrase help

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
culbin
Newcomer
Posts: 5
Joined: Sat Nov 25, 2023 8:59 pm
Great Britain

Search phrase help

Post by culbin »

Hello. I'm struggling to figure out a way to search the listings and record a list of specific episodes of Family Guy. There are over 400 episodes of Family Guy so I only want some known good ones to record if they happen to appear. I've researched high and low and I'm stumped on this one.

Example using just 2 episodes, both episodes are listed in the current guide.
I have tested individually
program.title = 'Family Guy' AND program.subtitle = 'Heart Burn'
program.title = 'Family Guy' AND program.subtitle = 'Cat Fight'

and they both find a match.

I tried
program.title = 'Family Guy' AND (program.subtitle = 'Heart Burn' OR program.subtitle = 'Cat Fight')
and it just matches Cat Fight.

I tried
(program.title = 'Family Guy' AND program.subtitle = 'Heart Burn') OR (program.title = 'Family Guy' AND program.subtitle = 'Cat Fight')
and it also just matches Cat Fight.

Is there anything like an array string that can be used? I couldn't see one.

Can anyone offer solutions? Thanks so much.
User avatar
bill6502
Developer
Posts: 2348
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Search phrase help

Post by bill6502 »

I have an unrelated, but similar, rule and the entire search is inside of ()s. Give that a shot.
culbin
Newcomer
Posts: 5
Joined: Sat Nov 25, 2023 8:59 pm
Great Britain

Re: Search phrase help

Post by culbin »

Unfortunately not, just matches 'Heart Burn'.

Don't worry, I'll just create individual searches. Thanks anyway.
boblewis
Newcomer
Posts: 1
Joined: Thu Jan 11, 2024 11:24 am
Location: US
United States of America

Re: Search phrase help

Post by boblewis »

Be aware this post is by a spammer but as it is mid topic I've left it here


If you're encountering issues with the OR condition in your queries, here's a generalized suggestion.

In many query languages or programming languages, you can use parentheses to group conditions, ensuring proper logical evaluation. For instance:

SELECT * FROM episodes
WHERE title = 'Family Guy' AND (subtitle = 'Heart Burn' OR subtitle = 'Cat Fight');

This SQL-like query retrieves episodes with the title 'Family Guy' and a subtitle of either 'Heart Burn' or 'Cat Fight.'

If you're using a different language or tool, the syntax might vary, but the idea is to use parentheses to clearly define the scope of your OR condition. If you provide more information about the language or tool you're using, I can offer a more tailored example.
Last edited by Steve Goodey on Mon Jan 29, 2024 8:41 am, edited 1 time in total.
Reason: Would normally delete but by the time I realised he was a spammer the post was mid topic.
culbin
Newcomer
Posts: 5
Joined: Sat Nov 25, 2023 8:59 pm
Great Britain

Re: Search phrase help

Post by culbin »

Thanks Bob, I appreciate your input. Unfortunately I did try that method (see my attempts in my original post) but the result was incorrect.
I have now created multiple individual searches so I'm all set.
Post Reply