Codeigniter:未显示单个帖子

I am trying to create a simple blog with a beginner's knowledge of Codeigniter. I have been able to loop all the blog posts in the index page. But when i try to open a single post it doesn't show up. Even though things seem correct to me so far.

Model:

function get_post($postID) {
            $this->db->select()->from('posts')->where(array('active'=>1, 'postID'=> 'postID'))->order_by('date_added', 'desc');
            $query = $this->db->get();
            return $query->first_row('array');
        }

Controller:

   function post($postID) {
        $data['posts']= $this->post->get_post($postID);
        $this->load->view('post',$data);
    }

View:

    <?php 
            if (!isset($post)) { ?>
            <p>This was accessed incorrectly</p>
            <?php } else { ?>

            <h2><?= $post['title']; ?></h2>
            <p><?= $post['post']; ?></p>
        <?php } ?>

The single page shows "This was accessed incorrectly". Here is the blog link blog link. Please help me.

It's probably the "typo" in:

$data['posts']= $this->post->get_post($postID);

see here you use posts (many) and then you try to access it with $post. So just change it to:

$data['post']= $this->post->get_post($postID);

and it should be fixed


UPDATE

Also in the model you have:

$this->db->select()->from('posts')->where(array('active'=>1, 'postID'=> 'postID'))->order_by('date_added', 'desc');

where you use 'postID'=> 'postID' the second part should be the variable $postID:

$this->db->select()->from('posts')->where(array('active'=>1, 'postID'=> $postID))->order_by('date_added', 'desc');