Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFR] Phalcon\Mvc\Model\Query - count() method #1156

Closed
ovr opened this issue Aug 26, 2013 · 2 comments
Closed

[NFR] Phalcon\Mvc\Model\Query - count() method #1156

ovr opened this issue Aug 26, 2013 · 2 comments
Labels

Comments

@ovr
Copy link
Contributor

@ovr ovr commented Aug 26, 2013

Hi all
Implement new count() method to class
like

        $result = $this->modelsManager->createBuilder('e')
            ->addFrom('User\Model\Event', 'e')

            ->leftJoin('User\Model\Follow\User', 'e.user_id = f.author_user_id', 'f')

            ->where('e.user_id <> '.$userId)
            ->andWhere('f.user_id = '.$userId)

            ->getQuery()
            ->count();

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@niden niden added Unassigned and removed Unassigned labels Apr 3, 2014
@Jurigag
Copy link
Member

@Jurigag Jurigag commented Jan 25, 2017

Not sure what was this meaning, doing:

->getQuery()
->execute()
->count();

Already works obviously but is selecting all records with data. Im guessing this NFR is for adding method which will actually add COUNT(*) to query i guess.

@stale
Copy link

@stale stale bot commented Apr 16, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale label Apr 16, 2018
@sergeyklay sergeyklay closed this Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.