This one's not an email problem.

You'll need to manually edit the query record in the query_builder table and change ''1'' (quote quote one quote quote) to just '1' or even just 1

The repeated quotation marks are likely a result of a PHP setting for magic_quotes_sybase on your server ... which can occasionally cause the extra quotes for supposed security.