[ticket/12693] Fix the query for bin/*

PHPBB3-12693