我在索引数组中有两个值(bookingId),现在我想使用这些值更新查询,但现在无法在循环中中断数组,我想运行更新查询(根据数组中的计数值)这是我的代码,我错在哪里?
$bookingIds; // contaning two values 176,190
$counts = count($bookingIds); // counting array values
for ($x = 1; $x <= $counts; $x++)
{
$data = array('approved' => "1");
$this->db->where('bookingId', $bookingIds);
$this->db->update('notifications', $data);
}
慕斯709654
慕莱坞森
慕神8447489