diff options
author | Simon Holywell <[email protected]> | 2013-01-03 13:58:22 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-01-03 13:58:22 +0000 |
commit | b241439aec5dd4123e9d6d4fbf5f60364b027797 (patch) | |
tree | c73a2004a7a0a67a1e75d4020a8e832bedcc3b8a /idiorm.php | |
parent | 8fa6f7059f56684397357a6a8eb69dbdd5102681 (diff) |
Change code to use get_last_statement
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1198,7 +1198,7 @@ } self::_execute($query, $this->_values); - $statement = self::$_last_statement; + $statement = self::get_last_statement(); $rows = array(); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { @@ -1345,7 +1345,7 @@ $this->_is_new = false; if (is_null($this->id())) { if (self::$_db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') { - $this->_data[$this->_get_id_column_name()] = $statement->fetchColumn(); + $this->_data[$this->_get_id_column_name()] = self::get_last_statement()->fetchColumn(); } else { $this->_data[$this->_get_id_column_name()] = self::$_db->lastInsertId(); } |