Escaping characters in a String

Hello, Part of my app is inputting stuff into a database, but I keep getting kicked errors because some entries have single quotes (')... How can I escape these? Is there a string method that is similar to PHP's 'addslashes' and 'stripslashes'?

Thanks! - Jeff

Jeff Miller wrote:

Part of my app is inputting stuff into a database, but I keep getting kicked errors because some entries have single quotes (')... How can I escape these? Is there a string method that is similar to PHP's 'addslashes' and 'stripslashes'?

Have a look at the various sanitize_sql_xxx methods available in ActiveRecord...