Where query url FIlter

What do I have to do to make a UrlParameter in the select dynamic.

Examples:
I call up the page and there is still no UrlParameter
http://www.same.page.com/user

now the select looks like this:

select * from User where userid = *

and all users are displayed.

now i click on a link with linkparameter
http://www.same.page.com/user?userid=10

now the select will look like this

select * from User where userid = 10

How can I do that

Please check:

This tutorial explaina how to use the query parameters values.

Yes, that’s clear, but what if I don’t give a url parameter then nothing happens and I want all the records to come.
i need like an if query for example if no url parameters then show all data

Are you filtering a database query or a select menu on the page?

I found the solution
grafik

I make a Condition and chek the length of a URL parameter.
If the length is mor then 0 i have a parameter an i set the url parameter in the querry
els i select all

important the querry ar every time with the same name only the WHERE statemant ar diferent.

There’s an easier way to do this, as there is a way to conditionally apply the filter only when it returns a value directly in the query builder:

Click the condition button and select the same expression used to filter your records.

Wow, it works thank you very much :grinning: :grinning: