Welcome Guest, Not a member yet? Register   Sign In
Active Record method chaining - doesn't work with update?
#5

The following methods do not return $this, so another db method can not be used after them in a chain:
count_all_results()
dbprefix()
delete()
empty_table()
get()
get_compiled_delete()
get_compiled_insert()
get_compiled_select()
get_compiled_update()
get_where()
insert()
insert_batch()
replace()
set_dbprefix()
truncate()
update()
update_batch()

Additionally, reset_query() returns $this and therefore can be chained, but it will reset your query, so it's more likely to be useful at the beginning of a chain than the end...
Reply


Messages In This Thread
RE: Active Record method chaining - doesn't work with update? - by mwhitney - 02-25-2015, 01:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB