Welcome Guest, Not a member yet? Register   Sign In
Database activate records delete
#1

[eluser]Unknown[/eluser]
Database activate records delete always returns true even if it's not there. I can't figure out why.
#2

[eluser]toopay[/eluser]
Did you try using
Code:
$this->db->affected_rows();
#3

[eluser]Aken[/eluser]
The delete() active record command will only return false if there is an error in the SQL statement. If the statement is valid but does not apply to any rows in your database, it will still process correctly and return true, it just won't delete anything because it didn't match.

As toopay said, use the affected_rows() method to check to see if anything was affected.




Theme © iAndrew 2016 - Forum software by © MyBB