Why is MySQLi statements bind_param giving this error? [duplicate]

我们两清 提交于 2020-01-17 04:51:10

问题


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)

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


回答1:


Try removing the commas in your $bind variable.

$bind = 'siiiiissssiss';


来源:https://stackoverflow.com/questions/8686518/why-is-mysqli-statements-bind-param-giving-this-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!