[drupal-devel] Why does node_save return $node->nid and not $node?
Robert Douglass
rob at robshouse.net
Wed May 18 20:50:43 UTC 2005
Hi y'all.
I've often wondered why node_save returns the nid instead of the whole
node. I've written code a couple of times where I want to
programmatically generate a node. I set $node->type, $node->uid and send
it off to node_save. At that point I'd like to get the filled out node
back, but instead usually have to call node_load with the nid I just
got. Is there a reason for this that I'm unaware of?
thanks
Robert
More information about the drupal-devel
mailing list