You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND e.edition_id = '1066' AND r.rt_type = '1' AND u.pnt > '0' AND u.rnk < '30'' at line 8