acschnabel wrote:

>I'm trying to display my staff members by department, not have to 
>repeat the department name in the table. Currently, the data appears 
>as follows
>  
>
I can't quite remember, but doesn't calling a field from a recordset 
"wipe" that field for that row, i.e. you can only call a field once per 
row? Probably not. It's been a long time since I last used a recordset 
in that manner (see getrows and arrays). Try a response.write of 
DeptName at the beginning and end of the code within the loop, which 
will show you what the if statement is using. I suggest putting the 
current field dept name into DeptName at the start of each iteration of 
the loop, and use LastDept to store the last dept shown, and compare 
those two. I imagine that it's good practice to minimise the number of 
calls to the recordset, so if you are going to be using a field more 
than once in a loop, chuck it into a variable and then use that.

Anyway, regardless of that, you should do a search on getrows, and look 
to use an array rather than recordsets. And don't use Select * in sql 
queries.

HTH

manzo


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12ho7smk8/M=362329.6886308.7839368.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1122682128/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to