You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'all' )' at line 1
SELECT `text_blocks`.`name`,`text_blocks`.`text` FROM `text_blocks`  WHERE `text_blocks`.`name`<> '' AND ( `text_blocks`.`domain`= ''' OR `text_blocks`.`domain`= 'all' )