Welcome Guest, Not a member yet? Register   Sign In
Codeigniter Return Values
#1

[eluser]Unknown[/eluser]
I think it'll be good if the documentation specifies the return values of the various functions.

For instance, I was working with the Active Record, using "update_batch". The query worked, and it updated the table values. But I ran the query in an if statement like below:

Code:
if($this->db->update_batch('table_name',$array, 'where_column'))
{
  //run another query
}

So, although it worked, it didn't execute the code inside the if statement. I checked the query using $this->db->last_query() and everything was ok. Was there an error I didn't know of? Was I checking for the correct return value? I don't know.... So my suggestion is that documentation should provide return values, so we surely know what to check for.

#2

[eluser]Unknown[/eluser]
Thanks Jason Stanley and John_Betong_002. I shall follow up with both suggestions.




Theme © iAndrew 2016 - Forum software by © MyBB