Fixed LIKE statement escaping issues
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 5299f1a..b0bd707 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -34,10 +34,9 @@
 
 	// the character used to excape - not necessary for PDO
 	var $_escape_char = '';
-
-	// clause and character used for LIKE escape sequences
-	var $_like_escape_str = " {escape '%s'} ";
-	var $_like_escape_chr = '!';
+	var $_like_escape_str;
+	var $_like_escape_chr;
+	
 
 	/**
 	 * The syntax to count rows is slightly different across different
@@ -52,6 +51,23 @@
 	{
 		parent::CI_DB($params);
 		
+		// clause and character used for LIKE escape sequences
+		if(strpos($this->hostname, 'mysql') !== FALSE)
+		{
+			$this->_like_escape_str = '';
+			$this->_like_escape_chr = '';
+		}
+		else if(strpos($this->hostname, 'odbc') !== FALSE)
+		{
+			$this->_like_escape_str = " {escape '%s'} ";
+			$this->_like_escape_chr = '!';
+		}
+		else
+		{
+			$this->_like_escape_str = " ESCAPE '%s' ";
+			$this->_like_escape_chr = '!';
+		}
+		
 		$this->hostname = $this->hostname . ";dbname=".$this->database;
 		$this->trans_enabled = FALSE;
 
@@ -306,9 +322,9 @@
 	 */
 	function affected_rows()
 	{
-		if ($this->db->db_debug)
+		if ($this->db_debug)
 		{
-			return $this->db->display_error('db_unsuported_feature');
+			return $this->display_error('db_unsuported_feature');
 		}
 		return FALSE;
 	}