Welcome Guest, Not a member yet? Register   Sign In
Model method not inserting data into database
#8

(08-27-2015, 11:48 AM)mwhitney Wrote: Using row_array() instead of row() simply changes how you must reference the data afterwards, and wouldn't help unless there was a typo in the existing code or there was a reason to pass an array instead of an object. In this case, $id should be a value retrieved from the row, hence $this->ion_auth->user()->row()->id (using row_array() would make it $row = $this->ion_auth->user()->row_array(); $id = $row['id']Wink.

More than likely, the issue is either that the id is an unexpected value or there is a problem inside the log_activity() method.

I agree with you. I am not returning any data from the function. On the other hand, I tried to pass values instead of variables in the parameters of the function, still it won't work. However, the same function, while used outside of the if(....) statement, would work fine. But even if I echo some random stuff to test if the "if" statement returns true, I can echo it out...it works on that end. 
Reply


Messages In This Thread
RE: Model method not inserting data into database - by cirox - 08-27-2015, 07:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB