Posted By

Jotape on 09/28/11


Tagged

php


Versions (?)

Show Error ADODB


 / Published in: PHP
 

Acompanhar erros retornado pelo adodb ou exception do bd.

  1. function getError(){
  2. $this->conn->RollbackTrans();
  3. $msg = $this->conn->ErrorMsg();
  4. $msg = str_replace(chr(10),'',$msg);
  5. $msg = str_replace('"','',$msg);
  6. $retono = json_encode(array(
  7. 'sucess' => false,
  8. 'msg' => utf8_encode($msq)
  9. ));
  10. die($retono);
  11. }

Report this snippet  

You need to login to post a comment.