Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Sep 2007 at 00:34 UTC
Updated:
27 Sep 2008 at 06:28 UTC
Please add a filter to refine a view with LIMIT (mysql). Sometimes you just want a recordset starting from e.g. record 5 until record 10 because you're already displaying record 0 till 5 through another view. I guess it's not too hard to add such a filter. The first value should be variable, the second one depends on the number of nodes that you've set to display in the view.
Comments
Comment #1
merlinofchaos commentedIn the PHP argument code, enter
$offset = 5;This will only work if you do NOT use paging. Set your nodes per page to however many items you want to see on that page.
Comment #2
(not verified) commentedComment #3
dropchew commentedHi,
I understand that for example setting $offset = 5; and node per page to 10 will show the 6th to 10th results in a view. But will the query still fetch all results and then limit the no of results shown? If so won't this process be inefficient? I may have misunderstood the 'limit' definition. Pls correct me if I am wrong...
But if its true, will there be PHP argument code/query that fetches x to y results and stop from there? Thanks!