Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By krwester on
There is a great little piece of code to display x most recent nodes from a list of terms
Could someone help me modify this so I can display (x+3) through (x + 10) latest knows (ie list the 4th through 8th latest stories from a taxonomy set). I've been looking at the code, and it occurs to me that it probably isn't too hard. But I can't seem to get my brain around it.
Thanks for your help.
Comments
...
The
db_query_range(..., 0, $count)
actually stands fordb_query_range(..., $offset, $count)
.That is,
to display stories #4 to #8 (exclusive), do
db_query_range(..., 3, 5)
to display stories #20 to #100 (exclusive), do
db_query_range(..., 19, 81)