Ok, this seems like it has to be simpler than I feel like. All I'm trying to do right now is grab a chunk of data from my MySQL db and then foreach my way through it to create a 'pretty' array to pass to the view. It does some simple summing along the way, adding each some fields together by day.
I am getting the db return fine I think:
$clientAccountId = ClientAdAccountId::findFirst();
$myData = myModel::find("customerId = '" . $clientAccountId->accountId . "'");
//I can var_dump myData and it looks like it's all there...?
//Then I pass it to a private function to do some adding of items together by day
$viewData = $this->parseData($myData, $startDate, $endDate);
In the private function, I try to foreach through the data, but it seems to be empty?
foreach( $myData as $row )
{
echo $row->name; //Never shows anything
}
I tried toArray, and some other things, but I think I'm just unable to understand the docs. What am I doing wrong? Thank you!
-J