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 'p_rank<3 and p_bnum IN (4,5,6,7,8) AND p_poss = '52' ) a ORDER BY F' at line 10