Solved

starting an ordered list at something besides 1 inside a cfoutput

Posted on 2003-11-05
6
241 Views
Last Modified: 2013-12-24
if i do the below ordered list, it creates an ordered list starting with 1.

*********
<ol>
<cfoutput query="qname" startrow="41" maxrows="60">
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfoutput>
</ol>
*********

i.e.

1. steve from Denver, CO
2. lisa from tampa, FL
3. joe from nashville, TN
.
.
.

how do i get it to start at 41?

i.e.

41. steve from Denver, CO
42. lisa from tampa, FL
43. joe from nashville, TN
.
.
.
 

0
Comment
Question by:sagardeo
6 Comments
 

Author Comment

by:sagardeo
ID: 9690042
oh wait, looks like <ol..> tag has a start attribute. i should use this right?

<ol start=5.....>
0
 

Author Comment

by:sagardeo
ID: 9690048
or in my case

*********
<ol start=41>
<cfoutput query="qname" startrow="41" maxrows="60">
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfoutput>
</ol>
*********
??
0
 
LVL 14

Assisted Solution

by:Renante Entera
Renante Entera earned 125 total points
ID: 9691118
You can also have it this way :

<ol>
<cfoutput>
<cfloop query="qname" startrow=41 endrow=60>
<!--- You may assign any number for your parameter "endrow" --->
<li><font face="arial" size="2">#firstname# from #city#, #state#</font></li>
</cfloop>
</cfoutput>
</ol>

Actually, your code should work.  I am referring to the code you posted on your question not on your comments.

Goodluck!
eNTRANCE2002 :-)
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 1

Expert Comment

by:Wasistdas
ID: 9691260
or use #currentrow# along with that cfloop
0
 
LVL 1

Accepted Solution

by:
Wasistdas earned 250 total points
ID: 9691275
Well, to be more precise: Better use the following code instead of <ol><li>:

<cfouput query="qname" startrow="41" maxrows="60">

#currentrow#. <font face="arial" size="2">#firstname# from #city#, #state#</font><br>

</cfoutput>
0
 
LVL 12

Assisted Solution

by:jyokum
jyokum earned 125 total points
ID: 9691791
i think you answered your own question. this seems to work fine.

<cfquery name="qryData" datasource="whatever">
SELECT * FROM table1
</cfquery>

<cfset myStart=41>
<cfset myRowcount=60>

<cfoutput>
<ol start="#myStart#">
</cfoutput>
<cfoutput query="qryData" startrow="#myStart#" maxrows="#myRowcount#">
<li>#qryData.columnA# #qryData.columnB#</li>
</cfoutput>
</ol>
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question