JDatabaseDriver::quote

Quotes and optionally escapes a string to database requirements for use in database queries.