A page to get sql result from db

<?php $sql = "SELECT sum(has_title) AS num_students FROM node_type"; $result = db_fetch_object(db_query($sql)); $num_students = $result->num_students; ?> There are <?=$num_students;?> students involved.