When I run the code below
$data = array(
'name' => $this->input->post('name'),
'recipe' => $this->input->post('recipe'),
'category_id' => $category_id,
'recipe_elements' => $this->input->post('recipe_elements'),
'country' => $this->input->post('country'),
'video' => $this->input->post('video'),
'img' => $img_name,
'vote' => $this->input->post('oy')
);
$this->db->insert('recipes',$data);
I get this error
A PHP Error was encountered Severity: 4096
Message: Object of class stdClass could not be converted to string Filename: mysql/mysql_driver.php Line Number: 552 Error Number: 1064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '
I already tried to change the input values but still getting the same error. Any help would be appreciated. How can I fix this?