Villa:
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 (type IN ('text','checkbox','dropdown','radio','textarea'' at line 2

SELECT * FROM #__nf_fields
                WHERE (form_id =  )
                 AND (type IN ('text','checkbox','dropdown','radio','textarea','statictext','carrier','date','email','pnr')) 
                ORDER BY ordering,id