Hi,
I have a search filter table where i can save searchcriteria, like country, region, status. I have also separate tables country, region, status.
Now i want to find all Users, where searchcriteria.country = country.country AND searchcriteria.region = region.region
For that i use the queryBuilder:
$users = $this->modelsManager->createBuilder()
->from('Vokuro\Models\Users')
->join('Vokuro\Models\Searchcriteria',null,'s')
->join('Vokuro\Models\Region',null,'r')
->join('Vokuro\Models\Country',null,'c')
->where('Vokuro\Models\Users.id != '.$id.' AND s.usersId = '.$id)
->andwhere("s.zipcode = r.region")
->andwhere("s.country = c.country")
->getQuery()
->execute();
The table searchcriteria has a usersId with the search data. So i think i have to choose the usersId first and then i have to select each other table. But how?
This is what i get
Dispatcher has detected a cyclic routing causing stability problems
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('Dispatcher has ...', 1)
#1 [internal function]: Phalcon\Dispatcher->_dispatch()
#2 [internal function]: Phalcon\Dispatcher->dispatch()
#3 C:\xampp7013\htdocs\site\public\index.php(33): Phalcon\Mvc\Application->handle()
#4 {main}
Thx