From d016d6c7f9d4f0ca44e004c2cfad5d98be1e86c7 Mon Sep 17 00:00:00 2001 From: rojaro <> Date: Thu, 27 Jan 2011 14:12:25 +0000 Subject: fixed #307 --- framework/Data/TDbConnection.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'framework/Data/TDbConnection.php') diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 4dccbad1..9078dfe0 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -217,14 +217,12 @@ class TDbConnection extends TComponent switch ($this->_pdo->getAttribute(PDO::ATTR_DRIVER_NAME)) { case 'mysql': + case 'sqlite': $stmt = $this->_pdo->prepare('SET NAMES ?'); break; case 'pgsql': $stmt = $this->_pdo->prepare('SET client_encoding TO ?'); break; - case 'sqlite': - $stmt = $pdo->prepare ('SET NAMES ?'); - break; default: throw new TDbException('dbconnection_unsupported_driver_charset', $driver); } -- cgit v1.2.3