Welcome Guest, Not a member yet? Register   Sign In
Error Number 1054 - Unknown column 'text_content_' in 'field list'
#1

[eluser]yuro[/eluser]
hello,

The site is not found on Google. It displays the status 500.

The following error message appears:

Quote:--Database Error--

<div id="content">
A Database Error Occurred

Error Number: 1054

Unknown column 'text_content_' in 'field list'
SELECT `text_content_` AS text_content, `menu`.`menu_name_` AS menu_name, `banner`
FROM (`content`)
LEFT JOIN `menu` ON `menu`.`content_id` = `content`.`content_id´
WHERE `content`.`content_id` = 1
</div>

In the data model_content.php is the programming of this part:
Code:
public function getContentDatabyId($id)
   {
      $this->db->select("text_content_".$this->session->userdata('web_lang')." AS text_content, menu.menu_name_".$this->session->userdata('web_lang')." AS menu_name,banner");
    $this->db->from($this->_tablesincorporated['content']);
    $this->db->join($this->_tablesincorporated['menu'], 'menu.content_id = content.content_id', 'LEFT');
    $this->db->where("content.content_id",$id);
    $query = $this->db->get(); //Here's the problem where gives me the Status 500, but when I commented this part, I get the Status 200, but than is the if-loop wrong.
      
      if($query->num_rows())
      {
         return $query->row();
      } else {
         return FALSE;
      }
   }

Help please Sad


Messages In This Thread
Error Number 1054 - Unknown column 'text_content_' in 'field list' - by El Forum - 04-10-2012, 02:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB