adama 2012-09-06 11:13:01 4593次浏览 4条回复 0 0 0
$command = Yii::app()->db->createCommand("EXEC S_CreateAccount '$username', '$password', $adult");
$result  = $command->execute();

用YII 调用 MSSQL 存储过程 怎么得到 返回值 ?

有大神会的吗?指教一下哈,谢谢.

补充:此处返回值 是 return 的值,不是 SELECT 出来的!

  • 回复于 2012-09-06 11:19 举报

    ? 返回值不是已经出来了

  • 回复于 2012-09-06 11:34 举报

    没有出来,那个只是 一个执行出来 影响行数值,不是返回值。

    http://www.yiiframework.com/doc/api/1.1/CDbCommand#execute-detail

    execute() method
    
    public integer execute(array $params=array ( ))
    $params	array	input parameters (name=>value) for the SQL execution. This is an alternative to bindParam and bindValue. If you have multiple input parameters, passing them in this way can improve the performance. Note that if you pass parameters in this way, you cannot bind parameters or values using bindParam or bindValue, and vice versa. binding methods and the input parameters this way can improve the performance.
    
    {return}	integer	number of rows affected by the execution.
    
  • 回复于 2012-09-06 11:40 举报

    大神 大神 你在哪里~

  • 回复于 2012-09-06 12:55 举报

    找到替代方法了~~ :D

您需要登录后才可以回复。登录 | 立即注册