## [Semediawiki-user] Negative Offset or Limit

 [Semediawiki-user] Negative Offset or Limit From: Thomas Hummel - 2011-03-02 13:00:38 ```Hi there, in advance thanks for the great support on this mailinglist. If have a question regarding the inline queries. The situation is the following: I query some dates and sort them descending (the most actual on top), say "dates coming up next". Now I only want to display the 5 dates that are next and not all of them. Here is my problem: If I use limit=5 I get the five "highest" dates, not the ones that would be next (obviously). limit=-5 is not allowed as it only restricts number of results. Probably I should use offset, but offset=-5 doesn't work neither. Is there any possibility to show only the "last" 5 results? Or do I have do compute the number of results and decrease it by 5 to get my offset with the help of an inline query? If yes how to do so? Thanks for your answer in advance, Thomas ```

 [Semediawiki-user] Negative Offset or Limit From: Thomas Hummel - 2011-03-02 13:00:38 ```Hi there, in advance thanks for the great support on this mailinglist. If have a question regarding the inline queries. The situation is the following: I query some dates and sort them descending (the most actual on top), say "dates coming up next". Now I only want to display the 5 dates that are next and not all of them. Here is my problem: If I use limit=5 I get the five "highest" dates, not the ones that would be next (obviously). limit=-5 is not allowed as it only restricts number of results. Probably I should use offset, but offset=-5 doesn't work neither. Is there any possibility to show only the "last" 5 results? Or do I have do compute the number of results and decrease it by 5 to get my offset with the help of an inline query? If yes how to do so? Thanks for your answer in advance, Thomas ```
 [Semediawiki-user] Negative Offset or Limit From: Thomas Hummel - 2011-03-02 18:05:59 ```Hi there, in advance thanks for the great support on this mailinglist. If have a question regarding the inline queries. The situation is the following: I query some dates and sort them descending (the most actual on top), say "dates coming up next". Now I only want to display the 5 dates that are next and not all of them. Here is my problem: If I use limit=5 I get the five "highest" dates, not the ones that would be next (obviously). limit=-5 is not allowed as it only restricts number of results. Probably I should use offset, but offset=-5 doesn't work neither. Is there any possibility to show only the "last" 5 results? Or do I have do compute the number of results and decrease it by 5 to get my offset with the help of an inline query? If yes how to do so? Thanks for your answer in advance, Thomas ```
 Re: [Semediawiki-user] Negative Offset or Limit From: Jeroen De Dauw - 2011-03-02 20:59:07 ```Hey, Have a look at the upcoming events query here: https://0x20.be/smw/index.php?title=Main_Page&action=edit Cheers -- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- ```