【问题标题】:How to catch out parameter message of pdo_oci in oracle procedure如何在 oracle 程序中捕获 pdo_oci 的参数消息
【发布时间】:2018-07-06 15:22:04
【问题描述】:

我的程序:

 $sql = "Begin VMS_REFUEL_PROC_APP_N('0','$p_reqtype','$p_vehiclename','$p_fueltype','$p_unit','$p_unit_price','0','$p_cur_reading','$p_station',:outmsg,'$p_apr_stat','$p_unit_2'); End;";

out 参数信息显示在:outmsg

我的连接返回这个变量:

self::$conn = Connection::getInstance(); 

连接类型pdo_oci

【问题讨论】:

  • 问题在标题中,但最初我在阅读内容时真的很想念它......

标签: java php oracle pdo oracle11g


【解决方案1】:
<?php
$outmsg = '';
$stmt = self::$conn->prepare( "CALL VMS_REFUEL_PROC_APP_N( '0', :p_reqtype, :p_vehiclename, :p_fueltype, :p_unit, :p_unit_price, '0', :p_cur_reading, :p_station, :outmsg, :p_apr_stat, :p_unit_2" );
$stmt->bindParam( ':p_reqtype', $p_reqtype );
$stmt->bindParam( ':p_vehiclename', $p_vehiclename );
$stmt->bindParam( ':p_fueltype', $p_fueltype );
$stmt->bindParam( ':p_unit', $p_unit );
$stmt->bindParam( ':p_unit_price', $p_unit_price );
$stmt->bindParam( ':p_cur_reading', $p_cur_reading );
$stmt->bindParam( ':p_station', $p_station );
$stmt->bindParam( ':outmsg', $outmsg, PDO::PARAM_STR, 4000); 
$stmt->bindParam( ':p_apr_stat', $p_apr_stat );
$stmt->bindParam( ':p_unit_2', $p_unit_2 );

$stmt->execute();

print "result: $outmsg\n";
?>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-08-12
    • 2016-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多