18591 Posts in 4875 Topics by 2285 members
General Questions
SilverStripe Forums » General Questions » Offset in query
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1042 Views |
-
Offset in query

26 January 2009 at 9:41pm
Is it possible to set the offset of a query? Do I have to use regular mysql queries to do this?
Thanks!
-
Re: Offset in query

26 January 2009 at 9:56pm
Have not tried it yet, but I guess it belongs in the "limit" parameter place, e.g. "'LIMIT'='$count' 'OFFSET'='$offset'".
-
Re: Offset in query

26 January 2009 at 11:03pm
yes, for a limit it would be something like:
return DataObject::get("MyPage", "", "Date DESC", "", "$limit");
or with an offset and a limit:
return DataObject::get("MyPage", "", "Date DESC", "", "$offset, $limit");
| 1042 Views | ||
|
Page:
1
|
Go to Top |


