我想在准备语句中发送数组值,但它不起作用
我的代码是:
for($bb=0; $bb<sizeof($subject_temp_array)-1; $bb++)
{
$sql ="select * from tbl_subjects where sub_id = ?";
if ($result = $mysqli->prepare($sql))
{
$subject_id = $subject_temp_array[$bb];
$result -> bind_param("i",$subject_id);
$result->execute();
$result->store_result();
$rows1 = $result->num_rows;
}
}