Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

count_all #21

Closed
TheShiftExchange opened this Issue · 2 comments

2 participants

@TheShiftExchange

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.

@michail1982

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

@TheShiftExchange

cool - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.