Hi!
I have a method in my controller which collects data like this:
public function GetData() {
$sqlQuery = new SQLQuery();
$sqlQuery->select("website");
$sqlQuery->from("listsitem");
$sqlQuery->groupby("website");
$result = $sqlQuery->execute();
$data = new DataObjectSet();
foreach($result as $row) {
$data->push(DataObject::get("ListsItem", "website ='".$row['website']."'", "", "", 2));
}
}
Before i did like this.
public function GetData() {
return DataObject::get("ListsItem", "website ='".$row['website']."'", "", "", 2));
}
And that worked fine with just:
<% control GetData %>
...
<% end_control%>
But how do i use the values from the dataset if its a multilevel array? I can't seem to find anything about this in the manual.
I would be very grateful for help with this!