Posted By

shinokada on 11/25/10


Tagged

status active


Versions (?)

Changing Active status


 / Published in: PHP
 

This is a model method to change active status. If it is 1 then change to 0 and vis verse

  1. function WeekStatus($id){
  2. // getting status of page
  3. $weekinfo = array();
  4. $weekinfo = $this->getweek($id);
  5. $status = $weekinfo['active'];
  6. if($status ==1){
  7.  
  8. $data = array('active' => 0);
  9. $this->db->update('omc_week', $data);
  10.  
  11. }else{
  12.  
  13. $data = array('status' => 1);
  14. $this->db->update('omc_week', $data);
  15. }
  16.  
  17. }

Report this snippet  

You need to login to post a comment.