DB count_all() not returns an integer always
Added some syntactical improvements within DB (braces)
Fixed a bug when doing 'random' on order_by() (#5706).
Fixed a bug where adding a primary key through Forge could fail (#5731).
Fixed a bug when using DB cache on multiple databases (#5737).
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index b8dce6d..c757e6a 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -913,7 +913,7 @@
$orderby = implode(', ', $temp);
}
- else
+ else if ($direction != $this->_random_keyword)
{
$orderby = $this->_protect_identifiers($orderby);
}