count_all #21

Closed
laurencei opened this Issue May 6, 2012 · 2 comments

Comments

Projects
None yet
2 participants

Is it a bug that count_all does not use the before_get and after_gel callbacks?

In my scenario I have the before_get callback used to always add "where user_id = current_user_id' - because users will only ever get their own records. So a "count_all" I was expecting to get the users count.

TheShiftExchange
count_all perform $this->db->count_all($this->_table); with mean all row by current table
you shood use $this->db->count_all_results($this->_table); at you code

PS I was thinking like you, but profiler said what i was wrong

cool - thanks

@laurencei laurencei closed this Jul 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment