mysql - MySQL PDO 查询未显示过程输出变量
问题描述
我想在我的 PDO 设置中获得一个带有过程的变量。我得到一个空数组();
$connection->query('
drop procedure if exists relatives;
create procedure relatives(in parent int(11),out counted int(11))
begin
set @counted=1;
end;
');
$fetch=$connection->query('call relatives(1,@counted); select @counted as c;')->fetchall();
解决方案
推荐阅读
- android - 如何在 init 中运行服务(Android 8.1)
- gitlab - 合并失败:合并请求不可合并。请再试一次
- linux-device-driver - 如何查看设备驱动源文件
- java - 如何在我的主要活动中声明一个新的 Java 类?
- php - 使用回调函数/方法
- bash - BASH - 使用 until 或 while 循环时获得无效响应
- vue.js - Vue uglifyjs-webpack-plugin 压缩选项失败
- ggplot2 - 试图在ggplot / R中的散点图上折叠部分x轴
- python - 可在带有 python 解释器的 windows 平台上执行
- c++ - 声明引用并传递它与仅通过引用传递相同吗?