Dynamic Qery Result Data

Hello to everyone.
I am trying to pull my data dynamically with Database Query module, but it processes all the data in the table and completes the job regardless of the value I send to the query. Example query;

SELECT * FROM optic
WHERE EXAM_ID IN (17724) AND UID IN (555132)
ORDER BY UID,SESSION, SECTION ASC

This query should return 1 page pdf to me, and all the uids in the table are generated and returned.

To help you properly we need to reproduce the issue. I suggest you open a technical support ticket through our website.