I have Drupal 7
site. I am creating node in my module as follows:-
$newNode = new stdClass();
$newNode->title = "Hello Node";
$newNode->type = "product";
node_object_prepare($newNode); // Sets some defaults.
$newNode->field_prod_type = 1;
$newNode->field_prod_cost = 125.00;
node_submit($newNode); // Prepare node for saving
node_save($newNode);
If I echo the above newNode I do get the successfull created new node id
echo "<pre>; print_r($newNode); exit();
Issue:-
But when I check in the database, I don't see any new record with the above node details.
Any help highly appreciated.