【发布时间】:2018-09-09 21:02:31
【问题描述】:
我正在尝试使用来自array key 的值更新表中的字段,下面是语句,但在使用数组键时我无法开始工作。我是新手,可能没有正确创建语句。任何帮助表示赞赏。
$this->db->set('product_qoh', 'product_qoh - $item['sold']' ,FALSE);
【问题讨论】:
标签: php database codeigniter
我正在尝试使用来自array key 的值更新表中的字段,下面是语句,但在使用数组键时我无法开始工作。我是新手,可能没有正确创建语句。任何帮助表示赞赏。
$this->db->set('product_qoh', 'product_qoh - $item['sold']' ,FALSE);
【问题讨论】:
标签: php database codeigniter
下面对我有用,上面是用 $item['sold'] 的否定替换单元格值。
$this->db->set('product_qoh', 'product_qoh - ' .$item['sold'] ,FALSE);
【讨论】: