Before anything else, I know that Active Record automatically escapes all queries by it and that there is a method for manually escaping SQL.
$this->db->escape()
The problem is that I am using raw sql queries sometimes
$sql = "...."
$this->db->query($sql);
but I don't want to manually call the CI escape function each time I do it.
Is there a way to make CI automatically escape all queries passed to it? A config that can be set maybe?