How To Use LIMIT With Queries

Please excuse me while I reveal my ignorance…
Is there a way to use LIMIT when using a query with Wappler?

1 Like

Either use a paged query initially or use the ‘top’ function in the the formatter. Using a paged query is the easiest.

1 Like

You may have a better idea… here’s what I would like to do:

Assign LIMITs to how many post in a blog. I’m thinking that if I base the cycle of blogs on the recent dates then the LIMIT would only keep a certain number of post within the date range.

Does that make sense?

I appreciate your help Brad!

Of you use paged query you van just enter a limit in the properties and you are done!

2 Likes

Are you trying to limit the number of blog posts that can be submitted in a certain date range? If so the best way to do that would be to hide the form submit button when the total number of posts within that date range reaches a certain number.

Have a query that has your start date and end date. Hide button if query total is equal to what ever limit you want.

If you simply want to show only the top five posts from a given date range then use a paged Query. Very simple.

1 Like