【问题标题】:How can we call sql server stored procedure using odbc_exec in php我们如何在 php 中使用 odbc_exec 调用 sql server 存储过程
【发布时间】:2014-10-29 12:57:57
【问题描述】:

我们如何在php中使用odbc_exec调用sql server存储过程。

我试过这段代码,但它不起作用:

include '../config2.php';

$sql = "EXEC MENTAL('F200', 'D', '39','41','1')";
$result=odbc_exec($baglanti, $sql);

while($query = odbc_fetch_array($result)) {
    $html .= $query['Code'] . ' ' . $query['CodeType'] . ' ' . 
             $query['TANIM'] . ' ' . $query['VakaSayısı'] . '<br>';
}    

echo $html;

谢谢

【问题讨论】:

    标签: php sql-server stored-procedures odbc procedure


    【解决方案1】:

    好的,伙计们,我找到了解决方案: sql statemtn 必须是这样的:

    $sql = "EXEC MENTAL @code='F200' , @Statu='D'";

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多