Welcome Guest, Not a member yet? Register   Sign In
Update and Flash-data messages not working
#5

(11-17-2017, 11:33 AM)PaulD Wrote: It looks ok to me. Perhaps you need to set the profiler to output on the page and see what queries are actually being run. Might help you to track down the problem. You may need to disable the redirect to check what was submitted and what query was executed.

In your model you have:
PHP Code:
    public function update($id, $data){
        $this->db->where('id', $id);
        $this->db->update($this->table, $data);
    

I would suggest that you check to see if it works and return TRUE or FALSE, then in your controller, only set the activity record if TRUE is returned, and some error if not,

PHP Code:
    public function update($id, $data)
    {
        $this->db->where('id', $id);
        if ($this->db->update($this->table, $data)) return TRUE;
           else return FALSE;
    

Also, does the activity record the correct id? Is the correct id appearing in your url for the form submit. Might help track down a problem too.

Not much help I know, sorry.

Paul.

Yes the activity table records everything from adding a record, updating or deleting, it even records when I change an old name into a new one.
I do Front-End development most of the time 
Reply


Messages In This Thread
RE: Update and Flash-data messages not working - by kirasiris - 11-17-2017, 10:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB