Jump to content

Archived

This topic is now archived and is closed to further replies.

adwfun

how many conditions are allowed to set after WHERE ?

Recommended Posts

I made a Select.....Where... query with over 10 conditions after Where. It returned with a syntax error and I am wondering if there is a maximum conditions allowed.

I did that because I setup 5 dropdown menu to let user choose and then submit to get data, and there are 8 tables required in Select....

Please kindly advise.
Thanks ???

Share this post


Link to post
Share on other sites
There's no limit (in theory), but huge queries can hit resource limits sometimes.  Can you post your query and the error message?

Share this post


Link to post
Share on other sites
Try putting the WHERE conditions inside (), like;

SELECT * FROM table WHERE (a=1, b=2, c=3, d=4)

Share this post


Link to post
Share on other sites
You can place parentheses, to be sure, but you'll have to use AND / OR, not commas.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.