Added the ability to prevent escaping in having() clauses.
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index bde43ab..23a5a7a 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -775,9 +775,9 @@
 	 * @param	string

 	 * @return	object

 	 */

-	function having($key, $value = '')

+	function having($key, $value = '', $escape = TRUE)

 	{

-		return $this->_having($key, $value, 'AND ');

+		return $this->_having($key, $value, 'AND ', $escape);

 	}

 

 	// --------------------------------------------------------------------

@@ -788,9 +788,9 @@
 	 * orhaving() has been deprecated

 	 */

 

-	function orhaving($key, $value = '')

+	function orhaving($key, $value = '', $escape = TRUE)

 	{

-		return $this->or_having($key, $value = '');

+		return $this->or_having($key, $value = '', $escape);

 	}	

 	// --------------------------------------------------------------------

 

@@ -804,9 +804,9 @@
 	 * @param	string

 	 * @return	object

 	 */

-	function or_having($key, $value = '')

+	function or_having($key, $value = '', $escape = TRUE)

 	{

-		return $this->_having($key, $value, 'OR ');

+		return $this->_having($key, $value, 'OR ', $escape);

 	}

 	

 	// --------------------------------------------------------------------

@@ -822,7 +822,7 @@
 	 * @param	string

 	 * @return	object

 	 */

-	function _having($key, $value = '', $type = 'AND ')

+	function _having($key, $value = '', $type = 'AND ', $escape = TRUE)

 	{

 		if ( ! is_array($key))

 		{

@@ -832,7 +832,12 @@
 		foreach ($key as $k => $v)

 		{

 			$prefix = (count($this->ar_having) == 0) ? '' : $type;

-			$k = $this->_protect_identifiers($k);

+

+			if ($escape === TRUE)

+			{

+				$k = $this->_protect_identifiers($k);

+			}

+

 			

 			if ($v != '')

 			{

diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index af51c0e..62e4541 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -60,6 +60,11 @@
 <h2>Version 1.6.2</h2>

 <p>Release Date: not currently released</p>

 <ul>

+    <li>Active Record

+    	<ul>

+    		<li>Added the ability to prevent escaping in having() clauses.</li>

+    		</ul>

+    </li>

     <li>Config

     	<ul>

     		<li>Added 'application/vnd.ms-powerpoint' to list of mime types.</li>

diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index 533d52d..a9889d5 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -403,21 +403,29 @@
         <br />

     // Produces: SELECT DISTINCT * FROM table</code></p>

 <h2>$this->db->having();</h2>

-<p>Permits you to write the HAVING portion of your query:</p>

+<p>Permits you to write the HAVING portion of your query. There are 2 possible syntaxe, 1 argument or 2:</p>

 	

 <code>$this->db->having('user_id = 45');

-<br /><br />

-// Produces: HAVING user_id = 45</code>

+<br />

+// Produces: HAVING user_id = 45<br />

+<br />

+$this-&gt;db-&gt;having('user_id',  45'); <br />

+// Produces: HAVING user_id = 45<br />

+<br />

+</code>

 	

 <p>You can also pass an array of multiple values as well:</p>

 

 

-<code>$this->db->having(array('title =' => 'My Title', 'id <' => $id));

-<br /><br />

-// Produces: HAVING title = 'My Title', id < 45</code>

-

-	

-	

+<p><code>$this->db->having(array('title =' => 'My Title', 'id <' => $id)); <br />

+		<br />

+	// Produces: HAVING title = 'My Title', id < 45</code></p>

+<p>If you are using a database that CodeIgniter escapes queries for, you can prevent escaping content by passing an optional third argument, and setting it to FALSE.</p>

+<p><code>$this-&gt;db-&gt;having('user_id',  45'); <br />

+// Produces: HAVING `user_id` = `45` in some databases such as MySQL

+		<br />

+		$this-&gt;db-&gt;having('user_id',  45', FALSE); <br />

+// Produces: HAVING user_id = 45</code></p>

 <h2>$this-&gt;db-&gt;or_having();</h2>

 <p>Identical to having(), only separates multiple clauses with &quot;OR&quot;.</p>

 <h2>$this->db->order_by();</h2>