I am able to query the nodes linked to a specific taxonomy and generate nodes, but in my loop the nodes get over written and in the end I hav eonly the last node.
 
Code:
 
 
 while ($node_tid = db_fetch_object($result)) { 

           global $user;
   $question->uid = $user->uid;
   
   $question->type= 'questions';
   $question->title = $node_tid->title;
 
           // $question = node_submit($question);
   $question->taxonomy = $category;
   $question->og_groups[]  = $gid;
  
        
    $new_id= node_submit($question);
     node_save($new_id);
         cache_clear_all();   
 }