Implement group_by() compiler and no_escape feature
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index 55b97bb..6c247f9 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -879,21 +879,24 @@
 	 */
 	public function group_by($by, $escape = NULL)
 	{
+		is_bool($escape) OR $escape = $this->_protect_identifiers;
+
 		if (is_string($by))
 		{
-			$by = explode(',', $by);
+			$by = ($escape === TRUE)
+				? explode(',', $by)
+				: array($by);
 		}
 
-		is_bool($escape) OR $escape = $this->_protect_identifiers;
-
 		foreach ($by as $val)
 		{
 			$val = trim($val);
 
 			if ($val !== '')
 			{
-				$this->qb_groupby[] = $val = $this->protect_identifiers($val);
+				$val = array('field' => $val, 'escape' => $escape);
 
+				$this->qb_groupby[] = $val;
 				if ($this->qb_caching === TRUE)
 				{
 					$this->qb_cache_groupby[] = $val;
@@ -2118,6 +2121,13 @@
 		{
 			$sql = "\nGROUP BY ";
 
+			for ($i = 0, $c = count($this->qb_groupby); $i < $c; $i++)
+			{
+				$this->qb_groupby[$i] = ($this->qb_groupby[$i]['escape'] === FALSE)
+					? $this->qb_groupby[$i]['field']
+					: $this->protect_identifiers($qb_groupby[$i]['field']);
+			}
+
 			$sql .= implode(', ', $this->qb_groupby);
 		}