A Database Error Occurred

Error Number: 1064

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 item_type_id = 25 AND type_id=31 order by order_index_1, order_index_2' at line 5

SELECT items_assignments.id, type, type_id, assignment_id, display_name, order_index_1, order_index_2 FROM items_assignments, types WHERE items_assignments.type_id=types.id AND item_id = AND item_type_id = 25 AND type_id=31 order by order_index_1, order_index_2