title: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1' at line 1
body: <p>I am rewriting MySQL statements to prepared ones, because of the SQL injections, but I can't get this to work. It returns:  </p>
  
  <blockquote>
    <p>Error: 1
    You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1' at line 1</p>
  </blockquote>
  
  <pre><code>$cihc = mysqli_prepare($conn,"UPDATE user SET picture=? WHERE id1=?");
  mysqli_stmt_bind_param($cihc, "si", $image, $userid);
  $sql = mysqli_stmt_execute($cihc);
  mysqli_stmt_close($cihc);
  if ($conn-&gt;query($sql) === TRUE) {
      echo "Sent successfully";
  } 
  else {
      echo "Error: " . $sql . "&lt;br&gt;" . $conn-&gt;error;
  }
  </code></pre>