diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-06-06 23:08:59 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-06-06 23:08:59 +0200 |
commit | 77f15dc6ba5d3308d42e8f75103c3193d3796dd2 (patch) | |
tree | 7e1a86f8b0ff954780a28bdea6c956649cf36d57 /system/database/drivers/pdo | |
parent | 110b467503f7a749aec685be445468c0f98b9e2a (diff) | |
parent | 916b176594bcf175417423f33711ac0cbb4082e7 (diff) |
Merge remote-tracking branch 'remotes/upstream/2.2-stable' into working
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Conflicts:
system/libraries/Session.php
user_guide/
Diffstat (limited to 'system/database/drivers/pdo')
-rw-r--r-- | system/database/drivers/pdo/pdo_driver.php | 17 | ||||
-rw-r--r-- | system/database/drivers/pdo/pdo_forge.php | 2 | ||||
-rw-r--r-- | system/database/drivers/pdo/pdo_result.php | 2 | ||||
-rw-r--r-- | system/database/drivers/pdo/pdo_utility.php | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php index 1ecc90a82..e0e7dab65 100644 --- a/system/database/drivers/pdo/pdo_driver.php +++ b/system/database/drivers/pdo/pdo_driver.php @@ -5,7 +5,7 @@ * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @author EllisLab Dev Team * @link http://codeigniter.com @@ -36,7 +36,7 @@ class CI_DB_pdo_driver extends CI_DB { var $_escape_char = ''; var $_like_escape_str; var $_like_escape_chr; - + /** * The syntax to count rows is slightly different across different @@ -45,7 +45,7 @@ class CI_DB_pdo_driver extends CI_DB { */ var $_count_string = "SELECT COUNT(*) AS "; var $_random_keyword; - + var $options = array(); function __construct($params) @@ -190,14 +190,12 @@ class CI_DB_pdo_driver extends CI_DB { { $sql = $this->_prep_query($sql); $result_id = $this->conn_id->prepare($sql); - $result_id->execute(); - - if (is_object($result_id)) + + if (is_object($result_id) && ($result = $result_id->execute())) { if (is_numeric(stripos($sql, 'SELECT'))) { $this->affect_rows = count($result_id->fetchAll()); - $result_id->execute(); } else { @@ -207,9 +205,10 @@ class CI_DB_pdo_driver extends CI_DB { else { $this->affect_rows = 0; + $result = FALSE; } - - return $result_id; + + return $result; } // -------------------------------------------------------------------- diff --git a/system/database/drivers/pdo/pdo_forge.php b/system/database/drivers/pdo/pdo_forge.php index 9a7822080..f7beb0a9a 100644 --- a/system/database/drivers/pdo/pdo_forge.php +++ b/system/database/drivers/pdo/pdo_forge.php @@ -5,7 +5,7 @@ * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @author EllisLab Dev Team * @link http://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_result.php b/system/database/drivers/pdo/pdo_result.php index 44fdd6dc5..4843df43b 100644 --- a/system/database/drivers/pdo/pdo_result.php +++ b/system/database/drivers/pdo/pdo_result.php @@ -5,7 +5,7 @@ * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @author EllisLab Dev Team * @link http://codeigniter.com diff --git a/system/database/drivers/pdo/pdo_utility.php b/system/database/drivers/pdo/pdo_utility.php index 88ce033aa..042ccef8d 100644 --- a/system/database/drivers/pdo/pdo_utility.php +++ b/system/database/drivers/pdo/pdo_utility.php @@ -5,7 +5,7 @@ * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. * @license http://codeigniter.com/user_guide/license.html * @author EllisLab Dev Team * @link http://codeigniter.com |