我无法在我的数据库中插入长字符串Id和下划线(_)

时间:2018-06-10 06:57:29

标签: php mysqli prepared-statement

mycode的:

if($_SERVER['REQUEST_METHOD'] == 'POST'){

if(isset($_POST['id_feuille']) && isset($_POST['nom_feuille']) ){  

    $id_feuille = $_POST['id_feuille'];
    $nom_feuille = $_POST['nom_feuille'];

    var_dump($id_feuille);   
    echo "<br>";
    var_dump($nom_feuille);

   $con = mysqli_connect("localhost","my_user","my_password","my_db");

    $statement = mysqli_prepare($con, "**UPDATE Parametres SET id_feuille = ? AND nom_feuille = ? WHERE type = N**");

    mysqli_stmt_bind_param($statement, "ss", $id_feuille,$nom_feuille); // Error is on this line

    mysqli_stmt_execute($statement);

    mysqli_stmt_close($statement); 


}
}

结果: enter image description here

  • 代码在id_feuille列中插入0或1
  • 图像显示了我想要插入的id的例子

enter image description here

0 个答案:

没有答案