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.

Data Model Questions /

take a request on each element of an Parent.


Reply


776 Views

Avatar
derpixler

Community Member, 4 Posts

23 January 2009 at 10:41pm

hey guys

will take a request on each element of an Parent.
I think so:
$doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$this->ID."'");

and i get this array,

DataObjectSet Object
(
.....[items:protected] => Array
..........(
...............[0] => CategoryHolder Object
................(
...................[record:protected] => Array
....................(
.........................[ID] => 17
.........................[ClassName] => CategoryHolder

but how i can get the children of CategoryHolder with the ID 17.

I think so:
$doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$this->ID."'");
$doSet = DataObject::get( "CategoryHolder","`ParentID` = '".$doSet->ID."'");

but the $doSet->ID is empty.