introduced 'usedb' variable to prevent making queries on small application that do not use database
Merge pull request #4 from domenicoficca/master

Fix to prevent queries without database