我试图用array key
中的值更新我的表中的字段,下面是语句但是在使用数组键时我无法工作。我是新手,可能无法正确创建声明。任何帮助表示赞赏。
$this->db->set('product_qoh', 'product_qoh - $item['sold']' ,FALSE);
以下对我有用,上面用$ item ['sold']的否定取代了单元格值。
$this->db->set('product_qoh', 'product_qoh - ' .$item['sold'] ,FALSE);