Can't access the line 0:
string(192) "
    		SELECT t1.*, t2.order
    		FROM frm_files t1
    		JOIN frm_filesassoc t2 ON = t2.fileId
    		WHERE t2.moduleId = 7 AND t2.fieldId = 36 AND t2.relatedId =  AND t1.type = 1
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 t1.type = 1' at line 4
Invalid sql query!