Added the println() methods to check out why the query is not sent to the database.