Welcome Guest, Not a member yet? Register   Sign In
What's the best way to determine if two tables were updated successfully using Active Record?
#2

[eluser]Benito[/eluser]
This will always return TRUE so I don't really see the point of:
Code:
! $this->db->affected_rows() || $this->db->affected_rows()
Why don't you simply check if company profile was updated/inserted, and then only insert company address if it was successful.
Your other option can be using transactions but this is only available if using InnoDB or BDB, but I think that would be an overkill.


Messages In This Thread
What's the best way to determine if two tables were updated successfully using Active Record? - by El Forum - 08-06-2010, 04:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB