Need help with Custom where clause query

I’m using SQL database connector to insert and select queries from External MySql database.

The query looks like this, select * from name where clause1 = string1 and clause2 = string2

I’m planning to use this query for a filter function. But I don’t have any idea how to form the query when one of the clause is missing.
Let’s say I only want to filter for clause1 it should look like this, select * from name where clause1 = string1

And not the full query line, how should I do that?

Any help is appreciated :slight_smile: