I'm doing a webapp with PHP and I have an array with some values which is greatherThan[]
, I need to make a prepared statement for each value of the array, for example if the array has the values 4,5,6
The php code is:
$stmt11 = $mysqli->prepare("SELECT nombre FROM usuarios WHERE id = ?");
$stmt11->bind_param('i', $greaterThan[]);
$stmt11->execute();
$stmt11->store_result();
$stmt11->bind_result($nombresmayores);
$arraynombresmayores = array();
$stmt11->store_result();
while($stmt11->fetch()){
$arraynombresmayores[] = $nombresmayores;
}