I am using Yii to work with the mysql stored procedure. Sp takes several parameters, one of which is the output parameter.
After running sp, when I try to get the output parameter, I run an error
CDbCommand did not execute the SQL statement: SQLSTATE [HY000]: General error: 2014 Unable to execute queries while other unbuffered queries are active. Consider using PDOStatement :: fetchAll (). Alternatively, if your code will only work with mysql, you can enable query buffering by setting the PDO :: MYSQL_ATTR_USE_BUFFERED_QUERY attribute. Executed SQL statement: select @error_info as a result;
My code layout is similar:
$sql = 'CALL p_bid(:username, @param)'; $command = Yii::app()->db->createCommand($sql); $command->bindParam(":username", $username, PDO::PARAM_STR); $command->execute();
How can I get around the question? Thanks.
source share