[ticket/12765] Use db_tools instead of generating queries at moment

PHPBB3-12765
[ticket/12765] Execute query directly from db tools

PHPBB3-12765
Merge pull request #2748 from carlo94it/ticket/12765

[ticket/12765] Use db_tools instead of generating queries at moment
Merge branch 'develop-ascraeus' into develop