You need to use two different DB handles, since the state of 2 selects cannot
be maintained in 1 DB handle.
>
> Can I not nest ns_db select statements?
>
>
> set classes [ns_db select $dbh "SELECT * FROM classes"]
> while {[ns_db getrow $dbh $classes]} {
> ns_puts "<tr><td>Class: .......</td></tr>"
> set students [ns_db select $dbh \
> "SELECT * FROM students WHERE cid='[ns_set value $classes id]'"]
> while {[ns_db getrow $dbh $students]{ {
> ns_puts "<tr><td>Student...</td></tr>"
> }
> }
>
> or is something wrong with my code that I can't figure out yet? (the above
> code was just quickly typed in for an example).
>
> Jeremy
>
>
>
> I. To remove yourself from this list:
>
> Send a message to "[EMAIL PROTECTED]" with the following text in
> the BODY of your message:
>
> signoff aolserver
>
> II. For a complete list of listserv options please visit:
>
> http://listserv.aol.com/
>
> III. For more AOLserver information please visit:
>
> http://www.aolserver.com/
>
I. To remove yourself from this list:
Send a message to "[EMAIL PROTECTED]" with the following text in
the BODY of your message:
signoff aolserver
II. For a complete list of listserv options please visit:
http://listserv.aol.com/
III. For more AOLserver information please visit:
http://www.aolserver.com/