Welcome Guest, Not a member yet? Register   Sign In
Set Posts activ/inactiv
#3

[eluser]Zimooon[/eluser]
Code:
function getPosts() {
    $query = $this->db->get('posts');
    $posts = array();

    foreach ($query->result() as $row) {
        $posts[] = array(
            'id' => $row->id,
            'title' => $row->title,
            'content' => $row->content,
            'date' => $row->date,
            'active' => $row->active
            
            
        );
    }

    return $posts;
}

This is my standard model code to get all posts ( to view them in adminpanel).

How to write this to check active?


Messages In This Thread
Set Posts activ/inactiv - by El Forum - 04-15-2011, 01:52 AM
Set Posts activ/inactiv - by El Forum - 04-15-2011, 04:31 AM
Set Posts activ/inactiv - by El Forum - 04-15-2011, 08:34 AM
Set Posts activ/inactiv - by El Forum - 04-15-2011, 12:06 PM
Set Posts activ/inactiv - by El Forum - 04-18-2011, 09:43 AM
Set Posts activ/inactiv - by El Forum - 04-18-2011, 10:48 AM
Set Posts activ/inactiv - by El Forum - 04-19-2011, 01:11 AM
Set Posts activ/inactiv - by El Forum - 04-19-2011, 03:55 AM
Set Posts activ/inactiv - by El Forum - 04-19-2011, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB