Sebuahhobi98

trasaction_ci

Apr 27th, 2019
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $this->db->trans_off();
  2. $this->db->trans_start();
  3. $data_update=array('total_tagihan' => 'total_tagihan+'.$tagihan);
  4. $this->db->update('pembayaran_mhs',$data_update,$npm);
  5. $this->db->trans_complete();
  6. if ($this->db->trans_status() === FALSE){
  7. // generate an error... or use the log_message() function to log your error
  8. $data=array(
  9. 'status_transaction' => $this->db->trans_status(),
  10. 'status' => 'Error!'
  11. );
  12. }else{
  13. $data=array(
  14. 'status_transaction' => $this->db->trans_status(),
  15. 'status' => 'Succes!'
  16. );
  17. }
Add Comment
Please, Sign In to add comment