php如果要调用,例如laravel,存储过程有返回值,直接调用会报错:
The active result for the query contains no fields
解决方式:
执行存储过程之前先执行 SET NOCOUNT ON,例如:
$tmpTable = $DB->select("SET NOCOUNT ON;EXEC getXxxx '1' ");
或者在存储过程开始时加入 SET NOCOUNT ON
php如果要调用,例如laravel,存储过程有返回值,直接调用会报错:
The active result for the query contains no fields
解决方式:
执行存储过程之前先执行 SET NOCOUNT ON,例如:
$tmpTable = $DB->select("SET NOCOUNT ON;EXEC getXxxx '1' ");
或者在存储过程开始时加入 SET NOCOUNT ON