[BUGFIX] Made SQL queries DBAL compatible

No concatenation though, since a single line will be faster

Change-Id: I76a43c5a498f4a7db7af79462dfc8bf2552ad788
Resolves: #63663
Releases: master
Reviewed-on: http://review.typo3.org/35166
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Tested-by: Jo Hasenau <info@cybercraft.de>