We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

NotInWhere Question

So I have TWO notInWhere, how can I write this not doble? It kind of looks messy when I write it doble.

$users = $this->modelsManager->createBuilder()
->from('table')
->notInWhere('table.user_id', [$this->user_id])
->notInWhere('table.user_id', $likes)
->getQuery()->execute();

What is $likes? Is it an array? If so, just add $this->user_id to the end of it and you can get rid of one of the notInWhere clauses.