Skip to main content

Posts

Showing posts with the label Single update method

One update method for all member

Function function admin_update($table=NULL,$id=NULL) {                  $id = convert_uudecode(base64_decode($id));          $status = $this->$table->findById($id);          $data[$table]['id'] = $id;          if($status[$table]['status']=='Inactive')          {              $this->$table->updateAll(array($table.'.status'=>'"Active"'),array($table.'.id'=>$id));          }          else          {              $this->$table->updateAll(array($table.'.status'=>'"Inactive"'),array($table.'.id'=>$id));          ...