small fix for database_query

mistaken variable name, cut extra spaces