replaced % with %% in user query for compatibility with queryDB()