Here is my query:
SELECT
h.id,
h.subject,
h.body matnF,
h.amount,
h.keywords tags,
h.closed,
h.author_id author,
h.AcceptedAnswe
The first thing I would try is a subquery:
from ((select q.* from quanda q where q.id = :id1) union
(select q.* from quanda q where q.related = :id2)
) left join
. . .
Note: This really wants indexes on quanda(id) and quanda(related) for performance.
If few rows are selected, then this might be much faster.