Langsung ke konten utama

Mengambil output cursor dan param oracle dari PHP

 $conn = @oci_connect("username", "password", "192.168.177.34/labora") or die;
 //$sql = 'BEGIN sayHello(:name, :message); END;';
 $sql ='BEGIN mnc_subscribe.SMS_S_V_SEARCH_CUSTOMER_2(:IVDGT,:NELWAN,:a,:b,:c,:pPageNo,:d,:pTotalPage,:csrCustomer); END;';
 $stmt = oci_parse($conn,$sql);
 $csrCustomer = oci_new_cursor($conn);

 // Assign a value to the input 
 $IVDGT   = 'IVDGT';
 $NELWAN  = 'NELWAN';  
 $pPageNo = 5;
 $a = '';
 $b = '';
 $c = '';   
 $d = 10;
 $pTotalPage=0;

 //  Bind the input parameter
 oci_bind_by_name($stmt,':IVDGT',$IVDGT,32);
 oci_bind_by_name($stmt,':NELWAN',$NELWAN,32); 
 oci_bind_by_name($stmt,':pPageNo',$pPageNo,32);
 oci_bind_by_name($stmt,':a',$a,32);
 oci_bind_by_name($stmt,':b',$b,32);
 oci_bind_by_name($stmt,':c',$c,32);
 oci_bind_by_name($stmt,':d',$d,32); 
 
 // Bind the output parameter
 oci_bind_by_name($stmt,':pTotalPage',$pTotalPage,32);
 // Bind the cursor resource to the Oracle argument
 oci_bind_by_name($stmt,":csrCustomer",$csrCustomer,-1,OCI_B_CURSOR);
 
 oci_execute($stmt);
 // Execute the cursor
 oci_execute($csrCustomer);

 // Use OCIFetchinto in the same way as you would with SELECT
 while ($entry = oci_fetch_assoc($csrCustomer)) {
  print_r($entry);
 }  
 var_dump($pPageNo);var_dump($pTotalPage); 

Komentar

Popular Posts

Render tips pada event render

render: function(p) { var theElem = p.getEl(); var theTip = Ext.create('Ext.tip.Tip', { html: 'Tuliskan Sequent Number atau Telephone Number atau Office Number atau Mobile Number atau Customer Number ', margin: '0 0 0 300', shadow: false }); p.getEl().on('mouseover', function(){ theTip.showAt(theElem.getX(), theElem.getY()); }); p.getEl().on('mouseleave', function(){ theTip.hide(); }); }

Menambahkan Item Id untuk HTML Attribut

{ border:false, frame:false, width: 225, margin: '5px 0px 10px 9px', items: [{ xtype : 'textfield', fieldLabel : 'Telephone', inputType :'password', id : 'telephone', inputId: 'item_telepon', width: 225, readOnly : true, fieldStyle :'background-image:none;background-color:#BDBDBD', },{ xtype : 'textfield', fieldLabel : 'Office no', inputType :'password', width: 225, id :'office_no', inputId: 'item_office_no', readOnly : true, fieldStyle :'background-image:none;background-color:#BDBDBD', },{ xtype : 'textfield', fieldLabel : 'Mobile no', inputType :'password', width: 225, id:'mobile_no', inputId: 'item_mobile_no', readOnly : true, fieldStyle :'back...