Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

starting an ordered list at something besides 1 inside a cfoutput

Posted on 2003-11-05
6
Medium Priority
?
247 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:Judy Deo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

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

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

Author Comment

by:Judy Deo
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 500 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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 1

Expert Comment

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

Accepted Solution

by:
Wasistdas earned 1000 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 500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

610 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