$data = mysql_query("SELECT * FROM table_name ORDER BY column_name ASC")
sådan noget ?
Ellers er w3schools et ok sted at kigge.
selve functionen hedder:
function get_pages_for_subject($subject_id, $public = true) {
global $connection;
$query = "SELECT *
FROM pages ";
$query .= "WHERE subject_id = {$subject_id} ";
if ($public)
{$query .= "AND visible = 1 ";}
$query .= "ORDER BY position ASC";
$page_set = mysql_query($query , $connection);
confirm_query($page_set);
return $page_set;
martin