Hello,
I know that i can use subqueries as a condition for a dbjoin element to search in another table(s) (ex: {thistable}.id IN (select field from another table), but the subquery will return distinct values and i need to return all the rows.
For example, running this kind of query in database will return the desired result:
and the result is (note the duplicates for the text "Dynamic Smart National")
While using a subquery like this
will return distinct values:
can i do it with Fabrik and dbjoin element?
Thank you
I know that i can use subqueries as a condition for a dbjoin element to search in another table(s) (ex: {thistable}.id IN (select field from another table), but the subquery will return distinct values and i need to return all the rows.
For example, running this kind of query in database will return the desired result:
Code:
select a.parent_id as value, a.denumire_camp as text
from contracte_setari_739_repeat a
join contracts_tool_servicii b on a.parent_id = b.abonament
where b.id_contract_main = 123457967
order by b.abonament
While using a subquery like this
Code:
SELECT parent_id as value, denumire_camp as text
from contracte_setari_739_repeat
WHERE parent_id IN (
SELECT abonament
FROM contracts_tool_servicii
WHERE id_contract_main = 123457967
)
will return distinct values:
can i do it with Fabrik and dbjoin element?
Thank you