You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')
AND (l.hide_sightings=0 OR s.users_id=)
/*GROUP ...' at line 25
Sightings of On-Track Plant & Road-Railers - March 2018
There were different sightings...