summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/postgre/postgre_driver.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/postgre/postgre_driver.php')
-rw-r--r--system/database/drivers/postgre/postgre_driver.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index e54f9cceb..076d87a58 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -423,14 +423,16 @@ class CI_DB_postgre_driver extends CI_DB {
* @param array the where clause
* @return string
*/
- function _update($table, $values, $where)
+ function _update($table, $values, $where, $limit = FALSE)
{
foreach($values as $key => $val)
{
$valstr[] = $key." = ".$val;
}
+
+ $limit = (!$limit) ? '' : ' LIMIT '.$limit;
- return "UPDATE ".$this->_escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where);
+ return "UPDATE ".$this->_escape_table($table)." SET ".implode(', ', $valstr)." WHERE ".implode(" ", $where).$limit;
}
// --------------------------------------------------------------------