Use NULL as the default value for offset in limit(x, offset) so that default is not LIMIT 0.
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 89766e3..7162e2a 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -872,11 +872,11 @@
* @param integer the offset value
* @return object
*/
- public function limit($value, $offset = '')
+ public function limit($value, $offset = NULL)
{
$this->ar_limit = (int) $value;
- if ($offset != '')
+ if ( ! is_null($offset))
{
$this->ar_offset = (int) $offset;
}