summaryrefslogtreecommitdiff
path: root/idiorm.php
diff options
context:
space:
mode:
authorSimon Holywell <[email protected]>2013-01-03 13:58:22 +0000
committerSimon Holywell <[email protected]>2013-01-03 13:58:22 +0000
commitb241439aec5dd4123e9d6d4fbf5f60364b027797 (patch)
treec73a2004a7a0a67a1e75d4020a8e832bedcc3b8a /idiorm.php
parent8fa6f7059f56684397357a6a8eb69dbdd5102681 (diff)
Change code to use get_last_statement
Diffstat (limited to 'idiorm.php')
-rw-r--r--idiorm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/idiorm.php b/idiorm.php
index dbf7905..251b53e 100644
--- a/idiorm.php
+++ b/idiorm.php
@@ -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();
}