Problem in updating field please help |
[eluser]dhaulagiri[/eluser]
It says , you must use the "set" method to update an entry. Pls help My model is Code: $this->db->where('id', $this->uri->segment(3)); My controller is Code: $data = $this->db->select('mytable', $_POST);
[eluser]falkencreative[/eluser]
What is the current result you are getting? Are you getting any errors? I would assume that you've looked at the user guide's section on this and made sure your code is matching up? http://ellislab.com/codeigniter/user-gui...tml#update
[eluser]dhaulagiri[/eluser]
I have a notice Message: undefined variable data, can anyone give me working example of updating tables in database ?
[eluser]falkencreative[/eluser]
The User Guide has pretty clear examples on how to use the update function: http://ellislab.com/codeigniter/user-gui...tml#update I am confused by this line: "$data = $this->db->select('mytable', $_POST);" since I believe your $data array needs to pass in the values you want to update, and you're using a select() function which grabs data from the database (http://ellislab.com/codeigniter/user-gui...tml#select) |
Welcome Guest, Not a member yet? Register Sign In |