By enjoylife-2 on
$attr = explode(",", $node->field_xlnum[0]['value']);
the $node->field_xlnum[0]['value'] is like this: 20,4,56,987,68,96. it each node's nid. now i want to get all the title and output it in li list style. how do i do.
<?php
$attr = explode(",", $node->field_xlnum[0]['value']);
$result = db_query("SELECT nid,title FROM {node} WHERE nid in ($attr) AND type=%s order by created DESC",'test');
while(($items=db_fetch_object($result)){
$output = theme_item_list($items, array('class'=>'tabs primary'));
echo $output;
?>
but it can't work
Comments
I see two things. %s is
I see two things.
%s is should be in single quotes ('%s')
This
should probably be something like