Fixed having method to insert quotes.
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index bc11ff4..0a25b3c 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -790,7 +790,7 @@
 
 			if ($v != '')
 			{
-				$v = ' '.$this->escape_str($v);
+				$v = ' '.$this->escape($v);
 			}
 
 			$this->ar_having[] = $prefix.$k.$v;