The issue is that there are no Team IDs populated in the query.
It states ... check for the right syntax to use near '))) AND A2.state' ...
. If you look for that part in the query it is this part (A1.staff_id = 0 AND A1.team_id IN ())) AND A2.state
. As you can see there are no team_id
s to match against so it fails with a syntax error. Why this occurs I have no idea as I don’t have access to your system.
I would recommend upgrading to the latest maintenance release of v1.10.6 to see if we addressed this issue already. You should upgrade regardless simply because v1.10.4 is vulnerable to SQL injection which is end game for your system, data, and database
If the issue still occurs with v1.10.6 then you should definitely do some debugging. Maybe see if they belong to a team or multiple teams, etc.
Cheers.