DB query for tabular results of all a db table's info
Use this table theming, next code created from comments below with some fixes:
    

  $header = array(
    array('data' =&gt; t('Age'), 'field' =&gt; 'age', 'sort' =&gt; 'asc'),
    array('data' =&gt; t('Savings'), 'field' =&gt; 'savingvalues'),
  );

  $result = pager_query("SELECT age, savingvalues FROM {savingvalues} " . tablesort_sql($header), 30);

  $data = array();
  while ($row = db_fetch_array($result)) {
    $data[] = $row;
  }
  $output .= theme('table', $header, $data);
  $output .= theme('pager');
?&gt;