DatabaseScript: Add variables from the SQL query to the SQL_BY_DOC
function
Merge pull request #115 from emmanuel-keller/master

DatabaseScript: Add variables from the SQL query to the SQL_BY_DOC