equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Db |
16 * @package Zend_Db |
17 * @subpackage Adapter |
17 * @subpackage Adapter |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Mysql.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Mysql.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 |
23 |
24 /** |
24 /** |
25 * @see Zend_Db_Adapter_Pdo_Abstract |
25 * @see Zend_Db_Adapter_Pdo_Abstract |
31 * Class for connecting to MySQL databases and performing common operations. |
31 * Class for connecting to MySQL databases and performing common operations. |
32 * |
32 * |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_Db |
34 * @package Zend_Db |
35 * @subpackage Adapter |
35 * @subpackage Adapter |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract |
39 class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract |
40 { |
40 { |
41 |
41 |
74 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, |
74 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, |
75 'FIXED' => Zend_Db::FLOAT_TYPE, |
75 'FIXED' => Zend_Db::FLOAT_TYPE, |
76 'FLOAT' => Zend_Db::FLOAT_TYPE |
76 'FLOAT' => Zend_Db::FLOAT_TYPE |
77 ); |
77 ); |
78 |
78 |
|
79 /** |
|
80 * Override _dsn() and ensure that charset is incorporated in mysql |
|
81 * @see Zend_Db_Adapter_Pdo_Abstract::_dsn() |
|
82 */ |
|
83 protected function _dsn() |
|
84 { |
|
85 $dsn = parent::_dsn(); |
|
86 if (isset($this->_config['charset'])) { |
|
87 $dsn .= ';charset=' . $this->_config['charset']; |
|
88 } |
|
89 return $dsn; |
|
90 } |
|
91 |
79 /** |
92 /** |
80 * Creates a PDO object and connects to the database. |
93 * Creates a PDO object and connects to the database. |
81 * |
94 * |
82 * @return void |
95 * @return void |
83 * @throws Zend_Db_Adapter_Exception |
96 * @throws Zend_Db_Adapter_Exception |