Langsung ke konten utama

Call Single SP Codeigniter

function insert_out_call($data)
 {
  $vPromo_Id               = $data['vPromo_Id'];
  $pCategory_Id            = $data['pCategory_Id'];
  $pMesssage               = $data['pMesssage'];
  $pCreated_By             = $data['pCreated_By'];  
  $vCall_Id                = ''; 
  
  try{
    $sql = "CALL sp_Insert_Mncshop_Out_Call(:vPromo_Id,:pCategory_Id,:pMesssage,:pCreated_By,:vCall_Id)";
    
    $stmt  = oci_parse($this->db->conn_id, $sql);
                
                // Bind the input parameter
    oci_bind_by_name($stmt,':vPromo_Id',$vPromo_Id);
    oci_bind_by_name($stmt,':pCategory_Id',$pCategory_Id);
    oci_bind_by_name($stmt,':pMesssage',$pMesssage);
    oci_bind_by_name($stmt,':pCreated_By',$pCreated_By);
    // Bind the output parameter
    oci_bind_by_name($stmt,':vCall_Id',$vCall_Id);    
   
   if(@!oci_execute($stmt)){
    $err = oci_error($stmt);
    
    throw new Exception($err['message']);
   }
   
      
  }  
  catch (Exception $e) {

  
   $result['status']   = FALSE;
   $result['message']  = $e->getMessage(); 
  
  
  }
  
  $result['status']  = TRUE;
  $result['message']  = 'Sukses Insert Outbound Call ID : ' .$vCall_Id;
  
  return $result;
  
 }

Komentar

Popular Posts

Extjs html class render

Ext.select('.datepicker').each(function(el){ new Ext.form.DateField({ allowBlank : true, renderTo: el, format:'m-d-Y', editable:false, width:140, fieldCls : 'tanggal x-form-field x-form-text x-trigger-noedit', }); }); Ext.select('.note').each(function(el){ new Ext.form.field.TextArea({ allowBlank : false, renderTo: el, grow : true, hideLabel : true, fieldCls : 'pesan x-form-field x-form-text x-trigger-noedit', }); });