Welcome Guest, Not a member yet? Register   Sign In
Please allow update_batch with multiple keys
#1

Example:
I have a MySQL table order_details (order_id, product_id, price).
Keys are: order_id and product_id.

Codeigniter should allow update batch with multiple keys like this:

PHP Code:
$data = array(
array(
'order_id' => 1,
'product_id' => 1,
'price' => 99
),
array(
'order_id' => 1,
'product_id' => 2,
'price' => 80
)
);
$this->db->update_batch('order_details'$data, array('order_id''product_id') ); 

Please add this feature.
Reply


Messages In This Thread
Please allow update_batch with multiple keys - by huangnam - 10-19-2020, 06:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB