I have the following logical condition:
WHERE (m.idAgent = agent OR agent is null)
It returns me all agents if I pass NULL as the agent param.
But how can I achieve the same thing in MYSQL?
That is, if I pass NULL for agent then the rest of that part of the WHERE condition (m.idAgent = agent) should be ignored and only the other conditions, not shown, which are not NULL should be considered.