Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PDO PHP存储过程(bindParam)_Php_Pdo - Fatal编程技术网

PDO PHP存储过程(bindParam)

PDO PHP存储过程(bindParam),php,pdo,Php,Pdo,bindParam和PDO对我来说一切都很好。 但当我添加3个bindParam时,它就不起作用了 工作示例: $stmt=$dbh->prepare("select * from SP_IMPORT_CRM_SELECTIE(?,?,'test','org naam','French','1','2','adres','adres1','city','city','state','state','postal','postal','country','country','po','po'

bindParam和PDO对我来说一切都很好。 但当我添加3个bindParam时,它就不起作用了

工作示例:

$stmt=$dbh->prepare("select * from SP_IMPORT_CRM_SELECTIE(?,?,'test','org naam','French','1','2','adres','adres1','city','city','state','state','postal','postal','country','country','po','po','phone','other','email','otheremail','fax','web','VAT')");

$stmt->bindParam(1, $firma, PDO::PARAM_INT);
$stmt->bindParam(2, $ACC, PDO::PARAM_STR,20);
当我添加第三个参数时,我的浏览器会显示消息=无法接收数据:

$stmt=$dbh->prepare("select * from SP_IMPORT_CRM_SELECTIE(?,?,?,'org naam','French','1','2','adres','adres1','city','city','state','state','postal','postal','country','country','po','po','phone','other','email','otheremail','fax','web','VAT')");

$stmt->bindParam(1, $firma, PDO::PARAM_INT);
$stmt->bindParam(2, $ACC, PDO::PARAM_STR,20);
$stmt->bindParam(3, $org, PDO::PARAM_STR,50);

bindParam有限制吗?

我有26个输入参数。当我在存储过程中返回26个值时,它就工作了。。 这正常吗?
因此,您必须始终具有与输出参数相同的输入数量?

可能有限制,但肯定不是3个。
$org
从哪里来?我在文件顶部定义了三个参数$firma=11$ACC=“AC123456789”$org=“orgnaam”;很难仅用一条错误消息给出提示,比如
无法接收数据
您的SQL语句毫无意义!哦,哇,我还没注意到。。