Hi guys,
i hav a question here
normally when we pass a query into “view”, we do:
in controller/function
$data[‘query’] = $this->db->get(‘entries’);in views (i use separate php for viewing)
<html><....<?php
foreach($query->result() as $row): ?>
<li> <?=$row->watever?> </li>...></html>
but when i try using get() method , i cant seem to get it work:
in controller/function
$query = new Horizontal();
$query->get();in views (i use separate php for viewing)
<html><....<?php
foreach ($query->all as $row){echo '<li>' . $row->watever . '</li>' .
}
it shows query not defined.
how can I do it correctly?