diff options
Diffstat (limited to 'system/database/drivers/odbc')
-rw-r--r-- | system/database/drivers/odbc/odbc_driver.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php index 5e1676244..66d5f89b9 100644 --- a/system/database/drivers/odbc/odbc_driver.php +++ b/system/database/drivers/odbc/odbc_driver.php @@ -394,14 +394,16 @@ class CI_DB_odbc_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;
}
// --------------------------------------------------------------------
|