| Author |
Missing the first record in a repeat region
|
|
| SharonM 2004-11-16, 6:54 pm |
| 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
| |
| Tom Muck 2004-11-16, 6:54 pm |
|
"SharonM" <webforumsuser@macromedia.com> wrote in message
news:cnd4da$eg2$1@forums.macromedia.com...
> 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/
| |
| SharonM 2004-11-16, 6:54 pm |
| Hi Thanks.
I am using ASPVB. Could you explain more about the rs.MoveNext please.
thanks so much.
sharon
| |
| Tom Muck 2004-11-16, 6:54 pm |
|
"SharonM" <webforumsuser@macromedia.com> wrote in message
news:cnd6kl$hhq$1@forums.macromedia.com...
> 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/
| |
| SharonM 2004-11-16, 6:54 pm |
| Thanks!!
Exactly what I needed.
regards
Sharon
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |