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

DatabaseScript: Add variables from the SQL query to the SQL_BY_DOC