Skip to content
Advertisement

How to query list of objects with paramteres that might not be entered?

I’m trying to query list of objects filtered by parameters that might not get entered by the user at all.

But i keep on getting similar errors that my syntax is wrong even tho i just copied it from a tutorial. Any idea where i might be mistaking?

Advertisement

Answer

If you want a single query:

From a performance perspective, OR can kill performance (by preventing the use of available indexes). Often applications build the WHERE clause for the non-NULL parameter values.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement