SELECT f.fileName,f.fileSize,f.fileType,f.fileContent
FROM
fileattachments as f,
(SELECT sa.fileUNID
FROM surveysessionsanswers as sa
WHERE sa.surveySessionID=
AND sa.questionID='imageFile') as s
WHERE s.fileUNID=f.fileUNID
Query failed : 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 sa.questionID='imageFile') as s
WHERE s.fileUNID=f.fileUNID' at line 7