使用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有限制吗?
答案 0 :(得分:0)
我有26个输入参数。当我在我的存储过程中返回26个值时,IT工作.. 这很正常吗? 所以你总是必须输出与输出参数相同的数量?