<?php
/**
* This php snippet displays nodes
* from a list of categories specified in the first line ($taxo_id)
*
* To increase/decrease the number of nodes listed
* change the $list_length value to suit.
*
* Works with drupal 4.6.x & 4.5.x
*
* Snippet submitted by Robert Garrigos (robertgarrigos)
* Updated by Sean Robertson (seanr)
*/
$taxo_id = "3,4,5"; /* comma seperated list */
$list_length = 1;
$sql = "SELECT * FROM {node} INNER JOIN {term_node} ON {node}.nid = {term_node}.nid WHERE {term_node}.tid in ($taxo_id) ORDER BY {node}.created DESC LIMIT $list_length";
$result = db_query($sql);
while ($anode = db_fetch_object($result)) {
$output .= theme('node', $anode, $teaser = FALSE, $page = FALSE);
}
print $output;
?>