[eluser]marc0[/eluser]
Hey, just getting into codeIgniter, what a great platform !
Here's the situation :
I have a controller that gets real-estate listings (properties) from a listings table
Now I have another table, containing open houses infos.
So in my properties controller:
--
Code:
$data['proprietes'] = $this->model_proprietes->get_proprietes($config['per_page'], $offset);
...
$this->template->write_view('content', 'properties', $data);
$this->template->render();
--
Now i need to add openhouse infos to the listings.
The only way I can think of getting every open houses would be like this inside my properties view :
Code:
foreach ($properties as $p) {
echo 'MLS: ' . $p->mls;
echo 'Open houses? ';
$open_houses = $this->model_proprietes->get_open_houses($p->mls);
foreach ($open_houses as $open_house)
{ echo $open_house->details; }
}
Thit just looks like horrible MVC programming to me... any suggestions ?!