From ba61451abadaa9d76878fb46b8bc8253e2958adc Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 14 Jun 2007 14:36:18 +0000 Subject: [PATCH] --- .../order-by-clause.txt | 56 +++++++++---------- manual/new/docs/en/getting-started.txt | 4 +- manual/new/docs/en/native-sql.txt | 4 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt b/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt index 510747093..d7fc05f22 100644 --- a/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt +++ b/manual/new/docs/en/dql-doctrine-query-language/order-by-clause.txt @@ -1,31 +1,31 @@ -+++ Introduction ++++ Introduction + +Record collections can be sorted efficiently at the database level using the ORDER BY clause. + +Syntax: + + + [ORDER BY {ComponentAlias.columnName} + [ASC | DESC], ...] + + +Examples: + + +FROM User u LEFT JOIN u.Phonenumber p + ORDER BY u.name, p.phonenumber + +FROM User u, u.Email e + ORDER BY e.address, u.id + + +In order to sort in reverse order you can add the DESC (descending) keyword to the name of the column in the ORDER BY clause that you are sorting by. The default is ascending order; this can be specified explicitly using the ASC keyword. + + +FROM User u LEFT JOIN u.Email e + ORDER BY e.address DESC, u.id ASC; + + -Record collections can be sorted efficiently at the database level using the ORDER BY clause. - -Syntax: - - - [ORDER BY {ComponentAlias.columnName} - [ASC | DESC], ...] - - -Examples: - - -FROM User.Phonenumber - ORDER BY User.name, Phonenumber.phonenumber - -FROM User u, u.Email e - ORDER BY e.address, u.id - - -In order to sort in reverse order you can add the DESC (descending) keyword to the name of the column in the ORDER BY clause that you are sorting by. The default is ascending order; this can be specified explicitly using the ASC keyword. - - -FROM User u, u.Email e - ORDER BY e.address DESC, u.id ASC; - - - +++ Sorting by an aggregate value +++ Using random order diff --git a/manual/new/docs/en/getting-started.txt b/manual/new/docs/en/getting-started.txt index ccdd979f6..6f886c223 100644 --- a/manual/new/docs/en/getting-started.txt +++ b/manual/new/docs/en/getting-started.txt @@ -34,7 +34,7 @@ class User extends Doctrine_Record public function setUp() { $this->hasMany('Phonenumber', array('local' => 'id', - 'foreign' => 'user_id'); + 'foreign' => 'user_id')); } } // file Phonenumber.php @@ -49,7 +49,7 @@ class Phonenumber extends Doctrine_Record { $this->hasOne('User', array('local' => 'user_id', 'foreign' => 'id', - 'onDelete' => 'CASCADE'); + 'onDelete' => 'CASCADE')); } } diff --git a/manual/new/docs/en/native-sql.txt b/manual/new/docs/en/native-sql.txt index 67aebb114..68850f93b 100644 --- a/manual/new/docs/en/native-sql.txt +++ b/manual/new/docs/en/native-sql.txt @@ -53,7 +53,7 @@ class User extends Doctrine_Record public function setUp() { $this->hasMany('Phonenumber', array('local' => 'id', - 'foreign' => 'user_id'); + 'foreign' => 'user_id')); } } // file Phonenumber.php @@ -68,7 +68,7 @@ class Phonenumber extends Doctrine_Record { $this->hasOne('User', array('local' => 'user_id', 'foreign' => 'id', - 'onDelete' => 'CASCADE'); + 'onDelete' => 'CASCADE')); } }