Pourquoi ne pas faire plus simplement ceci ?

UPDATE phpbb_posts
SET post_text = ''
WHERE post_text LIKE '&sid=%'