fixed a bug in pdo_driver.php

This commit is contained in:
hyung-hwan 2022-02-18 15:14:02 +00:00
parent 0e3878c644
commit 40f8d9abf9

View File

@ -273,7 +273,13 @@ class CI_DB_pdo_driver extends CI_DB {
function _execute($sql) function _execute($sql)
{ {
$sql = $this->_prep_query($sql); $sql = $this->_prep_query($sql);
$result_id = new CI_DB_pdo_statement_wrapper($this->conn_id->prepare($sql)); $stmt = $this->conn_id->prepare($sql);
if ($stmt === FALSE)
{
$this->affect_rows = 0;
return FALSE;
}
$result_id = new CI_DB_pdo_statement_wrapper($stmt);
if (is_object($result_id) && $result_id->execute()) if (is_object($result_id) && $result_id->execute())
{ {