Using SQL SELECT WITH multiple ORs

Hi there,
I am constructing a large query statement and I want this query to be in the format
select * from myTable WHERE ("long_conditions" AND id=115) OR ("long_conditions" AND id=116) OR  ("long_conditions" AND id=117)  ;
Is there a concise way to do this?  Thank you.

Here is the one I tried and it seems to get what I want to id=115, but returns everything for id=116, as the OR seems to be applied like  ("long_conditions" AND id=115) OR id=116;
I think I can introduce ( )s and achieve what I want, but it seems the query string is going to be really large.

SELECT LogID, Type, Event, strftime('%d/%m/%Y',Time,'unixepoch','localtime'), strftime('%H:%M',Time,'unixepoch','localtime'), time(Duration,'unixepoch'), Line FROM myTable WHERE datetime(Time,'unixepoch','localtime') >=date('2015-05-05') AND datetime(Time,'unixepoch','localtime') <=date('2015-05-06') AND time(Time,'unixepoch','localtime') > time('01:00') AND time(Time,'unixepoch','localtime') < time('23:00') AND time(Duration,'unixepoch') > time('00:10:39') AND  id="115" OR id=116;
ambuliAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
You should just be able to do....     WHERE  "long_conditions" AND (id=115 OR id=116 OR id=117)

You can also then make that a little more concise by doing....   WHERE  "long_conditions" AND id IN (115,116,117)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ambuliAuthor Commented:
Thank you!
mccarlIT Business Systems Analyst / Software DeveloperCommented:
You're welcome!
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Mike EghtebasDatabase and Application DeveloperCommented:
or

WHERE  "long_conditions" AND id in(115, 116, 117)
mccarlIT Business Systems Analyst / Software DeveloperCommented:
@eghtebas,

That was exactly what I wrote in my post. ?
Mike EghtebasDatabase and Application DeveloperCommented:
sorry, I just read the first part. My bad.
mccarlIT Business Systems Analyst / Software DeveloperCommented:
Ahhh, no worries. :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.