Good day. There is a code that receives a list of areas from the database:
$db = JFactory::getDbo(); $db->setQuery('SELECT DISTINCT aoguid, offname FROM ADDROBJ_NN WHERE (livestatus = 1 AND aolevel = 3) OR (AOLEVEL = 4 AND LIVESTATUS = 1 AND PARENTGUID = "88cd27e2-6a8a-4421-9718-719a28a0a088") ORDER BY offname'); $rows = $db->loadObjectList(); foreach ($rows as $row) { $options[] = JHTML::_('select.option', $row->aoguid, $row->offname); } return $options; data is displayed in the 1st select , in the 2nd select settlements are loaded according to the selected area. But there is such a problem as urban districts. They must enter both the districts and the cities. How to make a request (assuming that I only supplement the where part of the request, so that with the Арзамас area selected for example, in the second select , I’ve got out not only localities included in his district, but also the г.Арзамас (such . pieces 10) ??? all data (districts, cities and streets are in the same table, parsing from the FIAS base). The Fabrik component is used.
I tried it this way, but it does not work out ... it turned out that everything was done by force everywhere. inset
`aolevel=6 or aoguid='555e7d61-d9a7-4ba6-9770-6caa8198c483' or aoguid='7e42f157-87d6-4111-a406-17432e814723' etc. in the Where query field, but this is not an option.

... OR (parentguid in(select guid from ADDROBJ_NN where parentguid='nnnnn')- MikeFabrikcomponent forJoomlano one will help me here (((There cannot be usedwhereandand, I hoped that with the secondselectit will be possible, but not. - medvedevselect, as I understand it in the future (see the first screen) all the conditions are substituted for this request, and we can change only thewhere. On this and wrote that without understanding Fabrik, apparently it is impossible to help me. Thanks for the answer! - medvedev