2006-07-24 01:08:06 +04:00
|
|
|
<?php
|
|
|
|
// find all users, sort by name descending
|
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$coll = $conn->query("FROM User ORDER BY User.name DESC");
|
2006-07-24 01:08:06 +04:00
|
|
|
|
|
|
|
// find all users sort by name ascending
|
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$coll = $conn->query("FROM User ORDER BY User.name ASC");
|
2006-07-24 01:08:06 +04:00
|
|
|
|
|
|
|
// or
|
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$coll = $conn->query("FROM User ORDER BY User.name");
|
2006-07-24 01:08:06 +04:00
|
|
|
|
|
|
|
// find all users and their emails, sort by email address
|
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$coll = $conn->query("FROM User, User.Email ORDER BY User.Email.address");
|
2006-07-24 01:08:06 +04:00
|
|
|
|
|
|
|
// find all users and their emails, sort by user name and email address
|
|
|
|
|
2006-08-22 02:51:27 +04:00
|
|
|
$coll = $conn->query("FROM User, User.Email ORDER BY User.name, User.Email.address");
|
2006-07-24 01:08:06 +04:00
|
|
|
?>
|