Welcome Guest, Not a member yet? Register   Sign In
Sorry, but I just don't get it
#3

[eluser]cahva[/eluser]
And addition to the last answer, you should return the result from model, not echo it. I dont know if your code was just to test things and you have returned the result but here goes:

Code:
function listoutageupdates($id)
    {
        $this->db->order_by("updateid", "desc");
        $query = $this->db->get_where('updates', array('outageid' => $id));

        return $query->result();
    }

And view should be sumthing like this(althought im not entirely sure what you want to output):
Code:
<?php
        if ($update)
        {
            foreach ($update as $item)
            {
                ?&gt;<hr>
                <b>Update #&lt;?php echo $item->text.($item->updateid+1) ?&gt;</b><br />&lt;?php
                echo $item->updateid;
            }
        }
        ?&gt;


Messages In This Thread
Sorry, but I just don't get it - by El Forum - 06-24-2010, 04:47 AM
Sorry, but I just don't get it - by El Forum - 06-24-2010, 05:02 AM
Sorry, but I just don't get it - by El Forum - 06-24-2010, 05:44 AM
Sorry, but I just don't get it - by El Forum - 06-24-2010, 09:53 PM
Sorry, but I just don't get it - by El Forum - 06-28-2010, 12:27 AM
Sorry, but I just don't get it - by El Forum - 06-28-2010, 12:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB