Welcome Guest, Not a member yet? Register   Sign In
Detecting Model->delete() query result - how to detect error?
#7

Thanks InsiteFX.

I see there is also a brief mention of return results here for regular queries (though not for ->update(), or ->delete() commands, where this thread started): https://codeigniter.com/user_guide/datab...s.html#id2. The text from the manual is: "When “write” type queries are run it simply returns TRUE or FALSE depending on success or failure."

I've not tested it yet, but I'd be inclined to want to believe a DELETE is a 'write' type query... so in concept, it should return TRUE if it is successful... though, this still leaves the question of when the query executes successfully, but finds nothing to delete (?).
Reply


Messages In This Thread
RE: Detecting Model->delete() query result - how to detect error? - by Gary - 08-21-2020, 08:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB