[ticket/11731] Move a sql code to fit on one line

PHPBB3-11731