why not insert query is working whenever i am using right syn.,i have used this type syntax in my other function of same controller.
$reviewData = $this->input->post('reviewData');
$id=1;
$rdaraaa = array(
'id' => $id,
'content' => $reviewData
);
$this->db->insert('reviews', $rdataaa);
please help me
Your variable name is wrong.It should be
$this->db->insert('reviews', $rdaraaa);
You have given wrong array $rdataaa
instead of $rdaraaa
.And makesure that id,content are the column names in your table reviews
.
remove this code print_r($rdaraaa); die;
and it should be $this->db->insert('reviews',$rdaraaa)