All my blog posts so far...

<?php
/* list of recent posts of node type 'flexinode-1'
** output in descending chronological order
*/
unset ($output); // clear previous output
$node_type = "blog";
$list_no =5;
$sql = "SELECT node.title, node.type, node.nid FROM {node} WHERE node.type = '$node_type' AND node.status = 1 ORDER BY node.created DESC ";
$output .= '

    ';
    $result = db_query($sql);
    while ($anode = db_fetch_object($result)) {
    $output .= "
  • ".l($anode->title, "node/$anode->nid")."
  • ";
    }
    $output .= "

";
print $output;
?>