Closed brantje closed 6 years ago
I will do it
ERROR: Permission to brantje/nextnote.git denied to nickvergessen. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Mind to add me?
Yes, one second
@nickvergessen How can i do a COUNT()
? It's used here.
Fixed. Final code:
$this->qb->select('g.*', 'g.guid as guid', $this->qb->createFunction('COUNT(n.id) as note_count')) //'COUNT(n.id) as note_count'
->from('nextnote_groups', 'g')
->leftJoin('g','nextnote_notes','n', $this->qb->expr()->eq('g.id', 'n.notebook'))->groupBy(['g.id']);
Fixed with 2749443f87146981d9939acd11945762b8146625
Instead of as
please use selectAlias()
So it becomes $this->qb->createFunction('COUNT(n.id)')->selectAlias('note_count')
?
Actually
$this->qb->selectAlias($this->qb->createFunction('COUNT(' . $this->qb->getColumnName('n.id') . ')'), 'note_count')
Ps typed on phone, so no guarantee for typos
Perfect that works. Thanks.
No idea how to do this, yet. We have docs but that just describes the methods.
Aim of this is better compatibility between different databases.
Pinging @MorrisJobke @icewind1991 @MorrisJobke @nickvergessen @jancborchardt How do i implement this in my app? Is there any example? Best would be a PR which modifies 1 entity, eg note for example. However i understand that, if you're busy that's not an option.