我已经发布值$ a,$ b,$ c ...是数组格式 我给了这个模型文件。如何使用codeigniter插入多个数组到数据库
function insert_bank_data($da,$b,$c,$d,$e)
{
$data=array('date'=>$da,'des'=>$b,'amount'=>$c,'price'=>$d);
$this->db->insert_batch('total_trans',$data);
}
我得到这样的错误。
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22' at line 1
为什么使用';'两次? –
我删除它。我们得到 – manju
是$ da,$ b,$ c,$ d,$ e数组? – splash58