[eluser]Aziz Chouhan[/eluser]
hi all
i am working on codeigniter project since few days.
i have worked on all db related functions like select ,delete , update and insert, and these all worked very well.
but now i am facing a problem in db->insert();
this is my code which i written in a model function.
Quote: function update_hit_count($field_name,$field_id)
{
$data = array( 'field_name' => $field_name , 'field_id' => $field_id, 'hit_count' => '1' );
$this->db->insert('hit_count', $data);
}
when i called to this function with args as ('teacher',42)
it results 1 row as correct result
and also 3 or 6 rows as bad result with ('teacher',0,1)
i don't know where i m doing mistake
-------------------
i have also checked
$this->db->last_query();
which returns proper query
and also
$this->db->affected_rows()
which returns 1 row affected
-------------
can anybody help me on this issue
its really very urgent