previous->limit() (Previous) (Next) ->groupBy()next

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

->orderBy()

->orderBy() – Ajoute une condition 'orderBy'

Synopsis

void $DB_DataObject->orderBy ( string $order )

Description

Ajoute une condition 'orderBy'. L'appel à cette méthode sans argument efface la condition courante sur le trie.

Parameter

  • string $order - Le trie

Note

This function can not be called statically.

Example

Définission de la condition 'orderBy'

<?php
$person 
= new DataObjects_Person;
$person->orderBy('name');
$person->orderBy('age, eye');
$person->find();

// ou avec la direction :
$person = new DataObjects_Person;
$person->orderBy('name ASC');
$person->orderBy('age DESC, eye');
$person->find();
?>

SQL résultant


SELECT * FROM person ORDER BY name, age, eye
previous->limit() (Previous) (Next) ->groupBy()next

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.