Fix a bug.
Add a function to escape quotes which are in the sql queries.