Welcome Guest, Not a member yet? Register   Sign In
Active Record Question
#1

[eluser]Aidy[/eluser]
Sorry if this is a very dumb question but if I have a model like

Code:
function update($data, $id)
{
    $this->db->where('id', $id);
        
    return $this->db->update('table', $data);
}

would it return false if the query failed for some reason?

ThankYou
#2

[eluser]The Wizard[/eluser]
why not use affected_rows ?
#3

[eluser]Aidy[/eluser]
Hey herrkaleun,

Thanks for your reply, I had thought of using affected rows! Am just curious as much as anything.. Can anybody tell me?

Thanks
#4

[eluser]Nevio[/eluser]
As I remember, it will show error page. ( show_error() CI method ). Not sure if it returns anything but I'm sure that on error it displays SQL error message.
#5

[eluser]Aidy[/eluser]
Guess its irrelevant what it returns then!! Thanks for your replys.




Theme © iAndrew 2016 - Forum software by © MyBB