Query returns only one row in table (I tried with table helper, and without with my own table).
here is the example of view
// It returns only 1 row in table, but i need all where the `active` is '1'.
I tried with model too, no works. Hope it will be resolved or i will try another PHP MVC Framework.
here is the example of view
Code:
$query = $this->db->query("SELECT FROM `news` WHERE `active`='1');
foreach($query as $result);
{
$id = $result->id;
$msg = $result->msg;
$from = $result->from;
// Here goes table html (i don't post)
then the code
echo "<tr>"
echo "<td>$id</td>";
echo "<td>$msg</td>";
echo "<td>$from</td>";
}
// It returns only 1 row in table, but i need all where the `active` is '1'.
I tried with model too, no works. Hope it will be resolved or i will try another PHP MVC Framework.