So here is a small example of the query I play around with:
$db->setQuery('SELECT position, title FROM jos_modules
UNION (
SELECT position, title FROM jos_modules
)');
$data= $db->loadAssocList();
This returns all modules.
It does not matter if this does not make sense. It's just an example of a more complex query. The UNION approach is a must in the original query.
But i need the data indexed on a key like this:
$data= $db->loadAssocList('position');
If doing that, not all modules are returned. So it seems the indexing only catches the first result.
Can such a UNION query be done and results returned indexed on a key?