为什么MySQLi语句bind_param给出此错误? [英] Why is MySQLi statements bind_param giving this error?

查看:47
本文介绍了为什么MySQLi语句bind_param给出此错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发现我的代码有错误 HERE ...这是未解决了我的错误. ($ data是html表单数据)我什至不愿意排队每个变量,?,DB列和绑定字符,希望它会更清晰一些.我仔细检查并确保所有变量都与string/int匹配以与数据库匹配(这完全是另一个错误,但是在另一个线程中出现).

Getting an error with my code found HERE... Which is a culmination of all the chatter from HERE which was "Answered" but did not fix my error. ($data is html form data) I have even gone out of my way to line up each variable, ?, DB column, and bind character in the hopes that it'll be a little more clearer. I've went through and made sure that all the variables match up to string / int to match up with the database ( which is another error completely, but was brought up in the other thread ).

    DATABASE TABLE
    name        varchar(255)            
    cost        int(10)         
    perserv     int(5)          
    servings    int(10)         
    earns       int(10)         
    cp          int(10)         
    cooktime    varchar(11)         
    unlock      varchar(255)            
    special     varchar(255)            
    icon        varchar(255)            
    type        int(5)          
    options     varchar(255)            
    added       varchar(12)

警告:mysqli_stmt :: bind_param():变量数与准备好的语句中的参数数不匹配

Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement

推荐答案

尝试删除$bind变量中的逗号.

Try removing the commas in your $bind variable.

$bind = 'siiiiissssiss';

这篇关于为什么MySQLi语句bind_param给出此错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆