Interbase supports prepared queries, so you should probably use those instead of messing around trying to guess what the correct method of escaping is.
If you're using PHP 5.1 + you could try using PDO.
The "generic" way of escaping strings for SQL is to double up single quotes (') and not do anything else. But on some databases, that will be insufficient for arbritary binary data.
If you're storing binary data in a BLOB, I'd recommend using prepared statements.
The whole backslash this is entirely MySQL-specific and is not used on any other database that I am aware of.
Mark