Hi All

Any idea how i would change the following code so it displays the results by Title (alphabet) and NOT randomly. I got told i would need to remove the n.tid but not sure how i would do that

function updateone_childlisting($parentid = 12){

$js='
$(function(){
alert("Kill me softly...");
});

';
drupal_add_js("misc/jquery.js");

$sql = 'SELECT d.tid as tid,d.name as title, d.description as des, count(n.nid) as coun FROM term_hierarchy h inner join (term_data d, term_node n)on (d.tid=h.tid and n.tid=d.tid) where h.parent='.$parentid.' GROUP BY n.tid order by rand();';

$result = db_query($sql);
for($i=1;$row = db_fetch_array($result);$i++){

$out .= ''
.$row['title'] . '
['.$row['coun'].']

' ;

}
//drupal_add_js($js,"inline");
echo $out;

}
?>