HighDots Forums  

Missing the first record in a repeat region

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Missing the first record in a repeat region in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SharonM
 
Posts: n/a

Default Missing the first record in a repeat region - 11-16-2004 , 09:55 AM






Hi There

In my repeat region, I would like the first record to NOT show. Does anybody know how I can do this?

Many Thanks
Sharon

Reply With Quote
  #2  
Old   
Tom Muck
 
Posts: n/a

Default Re: Missing the first record in a repeat region - 11-16-2004 , 10:01 AM







"SharonM" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi There

In my repeat region, I would like the first record to NOT show. Does
anybody know how I can do this?

What server language are you using?

If ASPVB, you can do a rs.MoveNext before the repeat region.

In CF you can put a startrow=2 in the cfoutput

In PHP/MySQL you can can do a $row_rsname = mysql_fetch_assoc($rsname)
before the repeat region.


--
-------------------------------------------
Tom Muck
co-author Dreamweaver MX 2004: The Complete Reference
http://www.tom-muck.com/

Extending Knowledge, Daily
http://www.CommunityMX.com/




Reply With Quote
  #3  
Old   
SharonM
 
Posts: n/a

Default Re: Missing the first record in a repeat region - 11-16-2004 , 10:33 AM



Hi Thanks.

I am using ASPVB. Could you explain more about the rs.MoveNext please.

thanks so much.
sharon

Reply With Quote
  #4  
Old   
Tom Muck
 
Posts: n/a

Default Re: Missing the first record in a repeat region - 11-16-2004 , 10:45 AM




"SharonM" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Thanks.

I am using ASPVB. Could you explain more about the rs.MoveNext please.
Your repeat region probably looks something like this:

<%
While ((Repeat1__numRows <> 0) AND (NOT RSname.EOF))
%>
<tr>
<td><%=(RSname.Fields.Item("someField").Value)%> </td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RSname.MoveNext()
Wend
%>

If you insert a RSName.MoveNext() right before the repeat region starts,
you'll get the second record in the recordset (I'd put a conditional
statement on it to make sure there is more than one record in the region):

<%
If NOT RSName.EOF Then RSName.MoveNext()
While ((Repeat1__numRows <> 0) AND (NOT RSname.EOF))
%>
<tr>
<td><%=(RSname.Fields.Item("someField").Value)%> </td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
RSname.MoveNext()
Wend
%>


--
-------------------------------------------
Tom Muck
co-author Dreamweaver MX 2004: The Complete Reference
http://www.tom-muck.com/

Extending Knowledge, Daily
http://www.CommunityMX.com/




Reply With Quote
  #5  
Old   
SharonM
 
Posts: n/a

Default Re: Missing the first record in a repeat region - 11-16-2004 , 11:08 AM



Thanks!!

Exactly what I needed.

regards
Sharon

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.