Вы можете сделать что-то подобное, пока не выйдет следующая версия CI
private function get_query_string()
{
return 'SELECT ' .
implode( ' , ' , $this->db->ar_select ) .
' FROM ' .
implode( ' , ' , $this->db->ar_from ) .
( count( $this->db->ar_where ) ? ' WHERE ' : '' ) .
implode( ' ' , $this->db->ar_where );
}