Sanitize a string or an entire array prior to building an SQL query.