insert multiple rows via a php array into mysql

2018-12-31 03:17发布

I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if its possible to insert approximately 1000 rows at a time via a query other than appending each value on the end of a mile long string and then executing it. I am using the CodeIgniter framework so its functions are also available to me.

13条回答
长期被迫恋爱
2楼-- · 2018-12-31 04:10

Use insert batch in codeigniter to insert multiple row of data.

$this->db->insert_batch('tabname',$data_array); // $data_array holds the value to be inserted
查看更多
登录 后发表回答