diff options
Diffstat (limited to 'it_dbi_postgres.class')
-rw-r--r-- | it_dbi_postgres.class | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/it_dbi_postgres.class b/it_dbi_postgres.class index bce0fd9..5caaba9 100644 --- a/it_dbi_postgres.class +++ b/it_dbi_postgres.class @@ -122,21 +122,23 @@ function _query($query, $p) } */ } - - $this->_affectedrows = pg_affected_rows($result); - $this->_insertid = $isinsert ? $this->_fetch_assoc($result)[$this->_p['keyfield']] : 0; - /* TODO probably PGSQl_NOTICE_ALL - if (($warning = $this->_link->get_warnings())) + else { - do { - if (!it::match(trim($this->_p['ignored_warnings'] . "|1364|1261|1051|1062", "|"), $warning->errno)) - $messages[] = $warning->message . " [error $warning->errno]"; - } while ($warning->next() && ++$checked < 20); + $this->_affectedrows = pg_affected_rows($result); + $this->_insertid = $isinsert ? $this->_fetch_assoc($result)[$this->_p['keyfield']] : 0; + /* TODO probably PGSQl_NOTICE_ALL + if (($warning = $this->_link->get_warnings())) + { + do { + if (!it::match(trim($this->_p['ignored_warnings'] . "|1364|1261|1051|1062", "|"), $warning->errno)) + $messages[] = $warning->message . " [error $warning->errno]"; + } while ($warning->next() && ++$checked < 20); - if ($messages) - it::error(['title' => "Mysql warning: " . $messages[0], 'body' => "$query\n\n" . implode("\n", $messages) . "\n"]); + if ($messages) + it::error(['title' => "Mysql warning: " . $messages[0], 'body' => "$query\n\n" . implode("\n", $messages) . "\n"]); + } + */ } - */ return $result; } |