Filtering database query with variable input values

Dear fellow Wapplers

From the doldrums of my Wappler development trenches, I call out for some help… because it seems like I ran into a Wappler dead-end… which I didn’t expect…

What I need to accomplish is seemingly simple:

I have a table with a significant number of rows. A standard query works great with which to populate a bootstrap 5 table.

But to offer the user of my app a better experience, and also an essential feature, I need to present a BS card with some possible search criteria which can then be composed and used to filter the data returned from the database.

There are number of possible criteria, in this particular case, 5, which can be specified in any combination. As an example:

The database table contains available jobs. A job typically has a title, status, type, province, city, employer, recruiter and more.

A user searching for a job, must be able to filter on a combination of title (contains), status, type, and city. Any of these can be presented, or none at all. A single or multi value filter is possible, but the query, via database query or custom database query, needs to be defined up front as such.

But with the number of filter variables that can vary, in different combinations, this does not seem possible with the query builders.

I also made an attempt to pass the whole WHERE clause as a $GET variable to be bound within the SLECT statement, where this WHERE clause can be constructed on the fly before running the query. But this does not work either.

Is there another way?

Any brilliant and highly anticipated insights will be greatly appreciated!

Regards

Community Page
Last updated: