Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

How to use DataObject Get command


Go to End


2 Posts   3384 Views

Avatar
PeeJay

Community Member, 8 Posts

9 June 2009 at 2:23pm

Hi,

I am looking for some samples on the use of the following DataObject::Get command to query the data from database:

$records = DataObject::get($obj, $filter, $sort, $join, $limit);

I need to use this command to code a couple of controller objects but I can't find the details of $obj, $filter etc. A couple of sample codes will help me to use it.

Is there any documentation that I can look into?

Thanks
Pawan

Avatar
Willr

Forum Moderator, 5523 Posts

9 June 2009 at 5:43pm

If you are looking for API level docs on it you can find it http://api.silverstripe.com/sapphire/model/DataObject.html#get You cannot get controller object - its designed for classes which extend dataobject.

For examples of dataobject get just look through the tutorials / existing code.