Variables from dbase into tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm writing a tree structure out based on the values from a dbase table.
Each "node" is being represented as: <a
href="clickedon.php?location=1">, so I can get the location value. I
want the location value to be the "node_id" from the dbase, so when the
link is clicked, it will pass this node_id as the location in the tree.
Then, the name of the node passed as the text of the link. I have
written this, but it is not working:
 
$stmt=ociparse($conn,"select NODE_ID,THEME from NODE where
USER_ID='$user' and PARENT_ID='$parent'");
$exec=ociexecute($stmt);
$rows=ocifetchstatement($stmt,$maincat);
for($i=0; $i<$rows; $i++){
            while($column=each($maincat)){
            $id=$column['NODE_ID'];
            $name=$column['THEME'];
            print '<a href="clickedon.php?location=
'$id[$i]'>$name[$i]</a>';
            }
} 
 
Does anyone know what I'm doing wrong?
 
Thanks, 
Alexa

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux