Advertisement
Guest User

Untitled

a guest
Oct 30th, 2015
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. $p1 = ':p1'; $p2 = ':p2';
  2. $v1 = 'deny_self_tariff_change'; $v2 = 296090391;
  3. $args = [ [$p1, $v1],  [$p2, $v2] ];
  4.  
  5. $sth = oci_parse($dbh->conn, "select SI_SUBJECTS_PKG_S.GET_SUBJ_VALUE_TYPE_ID( :p1, SI_SUBJECTS_PKG_S.GET_SUBJ_TYPE_ID(:p2) ) from dual");
  6. foreach( $args as $a ) {
  7.     oci_bind_by_name($sth, $a[0], $a[1], -1);
  8. }
  9. oci_execute( $sth );
  10. print_r( oci_fetch_array($sth) );
  11.  
  12.  
  13.  
  14.  
  15. ===================
  16.  
  17. result:
  18.  
  19. ===================
  20.  
  21.  # /usr/lib64/php7.0/bin/php test.php
  22. Array
  23. (
  24.     [0] =>
  25.     [SI_SUBJECTS_PKG_S.GET_SUBJ_VALUE_TYPE_ID(:P1,SI_SUBJECTS_PKG_S.GET_SUBJ_TYPE_ID(:P2))] =>
  26. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement