Array output from function into a new query



Hi there,

I've got this function and I want to fill a new query with the output of this function. But I only get one value out of the array. How can I pass the output of this function into a new query?

tnx marc

// $parent is the parent of the children we want to see
// $level is increased when we go deeper into the tree,
// used to display a nice indented tree
function display_children($parent, $level) {
// retrieve all children of $parent
$result_btnt = mysql_query('SELECT nt FROM btnt '.
'WHERE bt="'.$parent.'";');

// display each child
while ($row = mysql_fetch_array($result_btnt)) {
// indent and display the title of this child

return $row['nt'];


// call this function again to display this
// child's children
display_children($row['nt'], $level+1);

}

}
.



Relevant Pages

  • Re: Query vs form with child & parent: Deleting rows
    ... subordinate to that record, that is, all individuals (and sometimes child ... companies) whose Owner field contains the record key of the parent company. ... That second form is fed by this query: ... But I have a child table called "Channel"; ...
    (microsoft.public.access.forms)
  • Re: Replacing key values with their referenced data records
    ... parent tables and child tables and then use the DataColumn.Expression ... you must include the reference ... Additionally, once I can get it to display properly, I need ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: Queries involving subforms
    ... If you create your query, with the parent & child tables joined, and add the ... you will get as many as there are child rows ...
    (microsoft.public.access.queries)
  • RE: How to show fields from related tables in the same datagrid
    ... the parent table and child table normally have master-details ... why I recommanded using combobox to display the related child table records ... Also, if you still does not want to display combobox, we have another ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: DataRelations and DataGrids
    ... one table, there is no build-in support for the updating synchroniztion, we ... I think your concern is displaying the all the child table's rows. ... just select the parent and child tables in 2 datatables in one dataset, ... then use the datarelation to display the selected child row's ...
    (microsoft.public.dotnet.framework.windowsforms)