Fetching CCK nodes spanning multiple Content Types
Posted by KingMoore on January 15, 2009 at 1:16am
CCK: 6.x-2.1
Drupal: 6.8
I am working on a module that needs to fetch sets of nodes based on various criteria (I don't think the criteria isn overly important for this discussion). The content nodes may span all content types installed on the site. I need to fetch a list of all the nodes matching my requirements and all of their fields/content.
I need this basic functionality:
$result = db_query('SELECT * FROM {node} WHERE #my conditions are met#');
while($row = db_fetch_object($result)){
$node = node_load($row->nid);
... do stuff ...
}