summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/pdo')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php17
-rw-r--r--system/database/drivers/pdo/pdo_forge.php2
-rw-r--r--system/database/drivers/pdo/pdo_result.php2
-rw-r--r--system/database/drivers/pdo/pdo_utility.php2
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