Variables from dbase into tree
| From: | Alexa Kirk | Date: | Wed, 09 Apr 2003 01:01:11 +0000 |
| Subject: | Variables from dbase into tree | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-26946@lists.php.net to get a copy of this message | ||
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