首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Php PDOStatement警告

Php PDOStatement警告
EN

Stack Overflow用户
提问于 2018-04-09 02:10:59
回答 1查看 23关注 0票数 0

我只是有一个小问题,我不能解决。我制作了一个表格,在数据库中添加住宿,并在文件中添加照片。查询工作正常,但我有几个小时的错误,我不能理解和看到我的问题。

代码如下:

代码语言:javascript
复制
if(move_uploaded_file($_FILES["imageheb"]["tmp_name"], $imgtarget) && move_uploaded_file($_FILES["photoheb"]["tmp_name"], $phttarget)){

$insertheb = $bdd->prepare("INSERT INTO hebergement(codetypeheb, nomheb, imageheb, nbplaceheb, surfaceheb, internet, anneeheb, secteurheb, orientationheb, etatheb, descriheb, photoheb, tarifsemheb) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)");

$insertheb->execute(array($codetypeheb, $nomheb, $nomimg, $nbplaceheb, $surfaceheb, $internet, $anneeheb, $secteurheb, $orientationheb, $etatheb, $descriheb, $tarifsemheb ));
                                
$valide = "Good !";
                              }

这是我的错误:

警告: PDOStatement::execute():SQLSTATEHY093:无效参数编号:绑定变量的数量与C:.....中的标记数量不匹配...

我在继续我的研究,谢谢你日安!

EN

回答 1

Stack Overflow用户

发布于 2018-04-09 02:19:53

在您的代码中,预准备sql语句中有13个占位符,而数组中只有12个值

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49721106

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档