我正在使用codeigniter,试图从数据库中减去我的一个输入值,但没有运气。我现在的模式是:从DB中减去PHP变量
$newstock = $this->input->post('f2');
$itemname = $this->input->post('f1');
$this->db->where('ItemName', $itemname);
$this->db->set('Stock', 'Stock-'.[$newstock], FALSE);
我得到这个错误:
Severity: Notice
Message: Array to string conversion
Filename: models/inventory.php
删除$ newstock中的括号 – Denmark
@Denmark我这样做时得到这个错误:http://d.pr/i/EXZS –