All pastes #458366 Raw Edit

Untitled

public text v1 · immutable
#458366 ·published 2007-04-25 21:00 UTC
rendered paste body
function task_eventList() {
	
	/* Get the event list from the database
	 * We might have to change the SQL query as the
	 * event module is not yet build.
	 */
	$sql = 'SELECT nid, title FROM {node} WHERE type = %d'; 
	$sql2 = db_query($sql, 'event');
	
	// Formatting an array for the hook_menu
	$list[0] = 'No parent';
	while ( $row = db_fetch_object($sql2) ) {
		$list[$row->nid] = $row->title;
	}
	
	// We return the array to process it
	return $list;
	
}