Added check for quote mark
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index 1a84404..24c658a 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -313,8 +313,11 @@
 		$str = $this->conn_id->quote($str);
 		
 		//If there are duplicated quotes, trim them away
-		$str = substr($str, 1, -1);
-
+		if(strpos($str, "'") === 0)
+		{
+			$str = substr($str, 1, -1);
+		}
+		
 		// escape LIKE condition wildcards
 		if ($like === TRUE)
 		{