[eluser]invision[/eluser]
Hi,
I know it doesn't make much sense. But is there an easy way to retrieve data from the database and display it to the public, using only the View?
Does it make sense to hard code this into a 'View' or perhaps create a module and call it?
There's a particular page on my site I want to list results from a table in the database.
I would do it the normal MVC way, but I think it's pretty tricky with my current setup.
I was going to use something like this:
Code:
if ($id == 4) {
$data['docs'] = $this->MPdfs->getAllPdfs();
echo $data['docs'];
if (count($docs)){
foreach ($docs as $key => $list){
//echo "<h2>".$list['title']."</h2>\n";
echo anchor('pdfs/download/'.$list['id'],'Download - '.$list['title']);
echo '<br />';
}
echo "<br/><br/>";
}
}
Thank you