Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 8
    Useful, but please note: this solution will work for queries on a single entity- with complex select statements, it will just refuse to work. Commented Sep 5, 2014 at 7:06
  • this solution produces additional query like SELECT COUNT(*) AS dctrn_count FROM (_ORIGINAL_SQL_) dctrn_result) dctrn_table which is actually nothing special but well known COUNT(*) solution Commented Feb 23, 2016 at 17:32
  • $paginator->getTotalItemCount() would be a solution too Commented Mar 29, 2017 at 7:07