was throwing a CFQUERY timeout. When I looked at the problem, I realized that CFLOOP must be holding open the query object, and then Coldfusion would throw the CFQUERY timeout error. To get around this, I decided to use CFLOOP, and then just iterate through the query object by referencing the rows. Here is how you do that:
<cfquery datasource="#Application.dsn#" name="notstudents">
where usertype != 'student'
<cfloop from="1" to="#notstudents.Recordcount#" index="id">
<!--- grab all associated categories --->
<cfquery datasource="#Application.dsn#" name="categories">
where userid = '#notstudents [ "myid" ][ id ]#'
"myid" is the field that I want to reference in the notstudents query, and "id" is the row. I like the array notation, though it was really Ben Nadel who helped me get to this point: