1
Well I am trying to make a select "bindado" however this returning the following error Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn’t match number of Parameters in Prepared statement in
$query = "SELECT * FROM duelos WHERE status='desafiado' AND desafiado='?'";
$statement = $mysqli->prepare($query);
//bind parameters for markers, where (s = string, i = integer, d = double, b = blob)
$statement->bind_param('s',$desafiante);
$statement->execute();
if($statement->execute()){
print 'Voce foi desafiado por $desafiante <br> Aceitar o desafio? <br> Sim - Nao';
}else{
print 'Nada a relatar';
}
$statement->close();
continues the same error I will update the code the status I will pass manually
– Arsom Nolasco
@Arsomnolasco challenged is a string or int?
– rray
is a string I changed the example
– Arsom Nolasco
@Arsomnolasco Colca in single quotes types
si
I changed the answer– rray
still continues , I updated the code to see how this
– Arsom Nolasco
@Arsomnolasco will not quote in interrogations and call the
execute()
only once.– rray
it was right here the error disappeared, but the return on print is not appearing any more that and other case . the question problem has been solved, if possible change the answer included these information
– Arsom Nolasco