Manipulate query n: n in an event

Hi !

Question, is there a way to add a where clause to this query from a php event?
the query is of an N: N relation

Yes, it’s a normal SQL command, you can put what you want

To be safe put the where condition in parenthesis

SELECT …
FROM …
WHERE (A=B & C<>D)
ORDER BY …