YII MSSQL 存储过程 返回值 [ 新手入门 ]
$command = Yii::app()->db->createCommand("EXEC S_CreateAccount '$username', '$password', $adult");
$result = $command->execute();
用YII 调用 MSSQL 存储过程 怎么得到 返回值 ?
有大神会的吗?指教一下哈,谢谢.
补充:此处返回值 是 return 的值,不是 SELECT 出来的!
共 4 条回复
-
chenyachao 回复于 2012-09-06 11:19 举报
? 返回值不是已经出来了
-
没有出来,那个只是 一个执行出来 影响行数值,不是返回值。
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.
-
-
adama
注册时间:2011-12-01
最后登录:1970-01-01
在线时长:0小时0分
最后登录:1970-01-01
在线时长:0小时0分
- 粉丝0
- 金钱25
- 威望0
- 积分25