I have recently switched to use in PDF / PHP / MySQL and changed dozens of questions . Most of them used to work, though it is very easy PDOStatement :: execute () pdostatement.execute SQLSTATE [HY093]: Invalid parameter number: Number of bound variables does not match token number ... After the research, I found this link: ... and therefore But still with the same result. Someone sees whether it is clearly wrong or why this question does not work when all others did? Thank you very much! You need a right array of input-only values to execute: You can also use it: But for this, you need to change your query to: What? Works as a pillillar and takes the variable from the array. When you use more placeholders in your SQL statement, the function takes all the variables out of the order in order. $ sql-> execute ()
$ sql = $ pdo-> Ready ("user name", $ user name); (Sql- & gt; User ID); $ Sql- & gt;;);
$ sql = $ pdo-> tried to change the query; ("selection" id From 'User' Where 'Username' =: Uses The name of the recipient is 1) "; $ Sql-> Act (array: 'username:', $ user name);
': Username', $ Username works only in BindParam () method:
$ Sql-> BindParam (': Username', $ User Love, PDO :: Param_st); Take a look here:
$ Sql - & gt; Execution (array (': user name' = & gt; $ username)); Placeholder:
$ sql-> ; Execute (array ($ username));
$ sql = $ pdo- & gt; Prepare ("Select 'id' to 'user' WHERE 'user name' =? LIMIT 1");
Comments
Post a Comment