Unfortunately not. I agree something like drupal_get_nodes would be spectacular - they have a get_node_types function, and I'm pretty sure that there will almost always be less node types than actual nodes themselves. I wonder if this is something going into version 6.
But db_query will be portable as long as you keep the node types it searches for flexible and make sure you use curly braces to retain table prefixing.



Joined: 08/14/2007