Added support for limit() into update() and delete() statements in Active Record.
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 66d5f89..040ffed 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -418,9 +418,11 @@
* @param array the where clause
* @return string
*/
- function _delete($table, $where)
+ function _delete($table, $where, $limit = FALSE)
{
- return "DELETE FROM ".$this->_escape_table($table)." WHERE ".implode(" ", $where);
+ $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+
+ return "DELETE FROM ".$this->_escape_table($table)." WHERE ".implode(" ", $where).$limit;
}
// --------------------------------------------------------------------