Put quotes around key & id in sql query. 

This was causing errors in mysql environment.
Merge pull request #570 from alexp82539/patch-1

Put quotes around key & id in sql query.