Returning the "x" last records from the table, but in ascending order
Options
brunoantoni
Member ✭
Hello.
How do I make a query on a table, returning the "x" last records from the table, but in ascending id order?
Thank very much for help.
Tagged:
Best Answer
-
No problem at all.
There is a filter "sort" that you can use:
Answers
-
Hi,
I would use pagination to return the number of records you need plus add sorting by created_at/id descending. then you can create variable with the result of the query and sort it by id ascending.
-
First, thank you for the response.
But how can I sort a variable?
-
It worked perfectly. Thank you very much for the help.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback