0

Hello everyone.

Here just page refresh Counter++.

    $this->db->select('Counter_field');
    $this->db->where('id', $id); 
    $cnt = $this->db->get('Job_Description');


    $new_cnt = $cnt+1;


    $data = array('Counter_field'=>$new_cnt);
    $this->db->where('id',$id);
    $query = $this->db->update('Job_Description',$data);

What is wrong with above Query..
Every time i want increment and go to update results store in DB.

2
Contributors
1
Reply
10
Views
3 Years
Discussion Span
Last Post by cereal
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.