From 6ddb5a17ae1a0a75ca75f846dbb7d3a98f1902a3 Mon Sep 17 00:00:00 2001
From: Derek Allard
Date: Tue, 18 Dec 2007 17:22:50 +0000
Subject: Added 'random' as an order_by() option in Active Record.
---
user_guide/changelog.html | 13 +++++++------
user_guide/database/active_record.html | 3 ++-
2 files changed, 9 insertions(+), 7 deletions(-)
(limited to 'user_guide')
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 5028032b2..612c4db62 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -66,10 +66,11 @@ Change Log
Added $assign_to_controller variable in the main index.php file. Anything that this variable contains will be passed automatically to a controller constructor when initialized.
Reorganized the URI and Routes classes for better clarity.
Javascript Calendar plugin now uses the months and days from the calendar language file, instead of hard-coded values, internationalizing it.
- Removed "rand()" as a listed option from orderby in the Active Record, as it was MySQL only.
+ Removed "rand()" as a listed option from orderby in the Active Record, as it was MySQL only.
+ Added 'random' as an order_by() option in Active Record.
Added titles to all user manual pages.
Added a check for NULL fields in the MySQL database backup utility.
- Documented the timezones() function in the Date Helper.
+ Documented the timezones() function in the Date Helper.
Documented unset_userdata in the Session class.
Changed the behaviour of custom callbacks so that they no longer trigger the "required" rule.
Added a few additional mime type variations for CSV.
@@ -79,16 +80,16 @@ Change Log
Added form_reset() function to form helper.
Added count_all_results() function to Active Record.
Added a language entry for valid_ip validation error.
- Added a third parameter to Active Record's like() clause to control where the wildcard goes.
+ Added a third parameter to Active Record's like() clause to control where the wildcard goes.
Moved the safe mode and auth checks for the Email library into the constructor.
Fixed a bug in highlight_pharse() that caused an error with slashes.
Fixed a bug in word_wrap() of the Text Helper that incorrectly referenced an object.
Fixed a bug in the Email library where some timezones were calculated incorrectly.
- Fixed a bug in Validation where valid_ip() wasn't called properly.
+ Fixed a bug in Validation where valid_ip() wasn't called properly.
Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space.
Fixed a bug in database driver where num_rows property wasn't getting updated.
Fixed a bug in captcha calling an invalid PHP function.
- Fixed a bug in _html_entity_decode_callback() when 'global_xss_filtering' is enabled.
+ Fixed a bug in _html_entity_decode_callback() when 'global_xss_filtering' is enabled.
Fixed a bug in the cookie helper "set_cookie" function. It was not honoring the config settings.
Fixed a bug that was making validation callbacks required even when not set as such.
Fixed an example of comma-separated emails in the email library documentation.
@@ -103,7 +104,7 @@ Change Log
Fixed a typo in the DocBlock comment for unset_userdata() in Session.
Fixed a typo in the table library docs.
Moved part of the userguide menu javascript to an external file.
- Deprecated from Active Record; getwhere() for get_where(); groupby() for group_by(); orderby() for order_by; orwhere() for or_where(); and orlike() for or_like().
+ Deprecated from Active Record; getwhere() for get_where(); groupby() for group_by(); orderby() for order_by; orwhere() for or_where(); and orlike() for or_like().
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index d608459e4..739d56a15 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -353,7 +353,7 @@ $this->db->or_like('body', $match);
$this->db->order_by();
Lets you set an ORDER BY clause. The first parameter contains the name of the column you would like to order by.
-The second parameter lets you set the direction of the result. Options are asc or desc
+The second parameter lets you set the direction of the result. Options are asc or desc, or random.
$this->db->order_by("title", "desc");
@@ -375,6 +375,7 @@ The second parameter lets you set the direction of the result. Options are
Note: order_by() was formerly known as orderby(), which has been deprecated.
+Note: random ordering is not currently supported in Orcacle or MSSQL drivers.
$this->db->limit();
Lets you limit the number of rows you would like returned by the query:
--
cgit v1.2.3-24-g4f1b