/**
  * Retrieve wanted posts from the database
  *
  * @access	private
  */
 private function get_content()
 {
     try {
         $to_read['table'] = $this->_sql_table;
         $to_read['columns'] = array('POST_ID');
         if (!empty($this->_search)) {
             foreach ($this->_words_to_find as $key => $word) {
                 $search = '%' . $word . '%';
                 $to_read['condition_types'][":title{$key}"] = 'OR';
                 $to_read['condition_columns']['group'][":title{$key}"] = 'post_title';
                 $to_read['condition_select_types'][":title{$key}"] = 'LIKE';
                 $to_read['condition_values'][":title{$key}"] = $search;
                 $to_read['value_types'][":title{$key}"] = 'str';
                 $to_read['condition_types'][":content{$key}"] = 'OR';
                 $to_read['condition_columns']['group'][":content{$key}"] = 'post_content';
                 $to_read['condition_select_types'][":content{$key}"] = 'LIKE';
                 $to_read['condition_values'][":content{$key}"] = $search;
                 $to_read['value_types'][":content{$key}"] = 'str';
             }
         } elseif (!empty($this->_tag)) {
             $to_read['condition_columns'][':tag'] = 'post_tags';
             $to_read['condition_select_types'][':tag'] = 'LIKE';
             $to_read['condition_values'][':tag'] = '%' . $this->_tag . '%';
             $to_read['value_types'][':tag'] = 'str';
         } elseif (!empty($this->_cat)) {
             $to_read['condition_columns'][':cat'] = 'post_category';
             $to_read['condition_select_types'][':cat'] = 'LIKE';
             $to_read['condition_values'][':cat'] = '%' . $this->_cat . '%';
             $to_read['value_types'][':cat'] = 'str';
         } elseif (!empty($this->_by_date)) {
             $to_read['condition_columns'][':date'] = 'post_date';
             $to_read['condition_select_types'][':date'] = 'LIKE';
             $to_read['condition_values'][':date'] = $this->_by_date . '%';
             $to_read['value_types'][':date'] = 'str';
         }
         $to_read['condition_types'][':status'] = 'AND';
         $to_read['condition_columns'][':status'] = 'post_status';
         $to_read['condition_select_types'][':status'] = '=';
         $to_read['condition_values'][':status'] = 'publish';
         $to_read['value_types'][':status'] = 'str';
         $to_read['limit'] = array($this->_limit_start, parent::ITEMS_PAGE);
         $to_read['order'] = array('post_date', 'DESC');
         $this->_content = $this->_db->read($to_read);
         $this->get_nb_pages($to_read);
         if (!empty($this->_content)) {
             foreach ($this->_content as &$post) {
                 $post = new Post($post['POST_ID']);
                 $user = new User();
                 $user->_id = $post->_author;
                 $user->read('_publicname');
                 $post->_author_name = $user->_publicname;
                 $updated = $post->__get('_updated');
                 if ($updated == 'yes') {
                     $user->_id = $post->_update_author;
                     $user->read('_publicname');
                     $post->_update_author_name = $user->_publicname;
                 }
             }
         }
     } catch (Exception $e) {
         @error_log($e->getMessage() . ' file: ' . __FILE__ . '; line: ' . __LINE__, 1, WS_EMAIL);
         header('Location: 404.php');
     }
 }