Welcome Guest, Not a member yet? Register   Sign In
update from array values
#1

[eluser]Kamusksn[/eluser]
Hello, I have a form with a static field "id" and 'N' number of fileds quantity[] & description[]


I'm gettin the values on my model
Code:
$data['id'] = $this->input->post('id');
$data['quantity'] = $this->input->post('quantity');
$data['description'] = $this->input->post('description');


DATABASE FIELDS:
Code:
id
quantity
description

e.g. I have an array ($data) with the following content
Code:
ID-XXX
Array ( [0] => 1 [1] => 5 )
Array ( [0] => Lock [1] => Key  )

How can I update my DB with the new information
Code:
$this->db->where("ID and Description match array information");
$this->db->update('products', $array_here);


Messages In This Thread
update from array values - by El Forum - 05-13-2014, 12:38 PM
update from array values - by El Forum - 05-13-2014, 01:56 PM
update from array values - by El Forum - 05-14-2014, 08:03 AM
update from array values - by El Forum - 05-14-2014, 12:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB