I've been using $this->db->affected_rows()
to check if updates have been successful. But this doesn't work when a user inputs the same data to be stored that is already stored (because no column is actually updated). My workaround has been to get the stored data, compare to the inputted data, update if different, return a NO_CHANGE constant if same. With JSON data, there's an extra parsing step.
Is there an easier way to check that there was no error with the update? As in, something that doesn't require getting the stored data beforehand?