Ethan;

If you are looping through your query, you would have something like this:

<CFLOOP Query="TotalRecord">
        <CFIF TotalRecord.ID EQ 4>
                <CFOUTPUT>#TotalRecord.CurrentRow#</cfoutput>
        </cfif>
This would work if the row number and record number were not the same.

Larry Juncker
Senior Cold Fusion Programmer
Heartland Communications Group, Inc.


-----Original Message-----
From: Ethan Rosch [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 11:42 AM
To: CF-Talk
Subject: row # in database??


This is a multi-part message in MIME format.

------=_NextPart_000_0075_01C0376E.73531990
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I think this is a rather simple question....

How do I find the row # of a certain row of data in my database?  Such =
that I can say "this is record 3 of 10". =20

I know the query.recordcount function to get the 10 as a seperate query =
for all records in that database.

but I am stuck on the first part, as I am not checking for the row # of =
the query that I am using to get my info, as that will always be 1.



<CFQUERY name=3D"TotalRecord" dataSource=3D"flashback">
 SELECT Survey.ID
 FROM Survey
</CFQUERY>

<HTML><HEAD>
 <TITLE>Survey Results</TITLE>
</HEAD><BODY bgcolor=3D"ffffff">

<FONT size=3D"+1">Survey Results</FONT> <BR>

<cfoutput query=3D"TotalRecord">
#Currentrow# of #TotalRecord.RecordCount
</cfoutput>

thanks,

ethan


------=_NextPart_000_0075_01C0376E.73531990
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I think this is a rather simple=20
question....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>How do I find the row # of a certain =
row of data in=20
my database?&nbsp; Such that I can say "this is record 3 of 10".&nbsp;=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know the query.recordcount function =
to get the 10=20
as a seperate query for all records in that database.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>but I am stuck on the first part, as I =
am not=20
checking for the row # of the query that I am using to get my info, as =
that will=20
always be 1.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;CFQUERY name=3D"TotalRecord"=20
dataSource=3D"flashback"&gt;<BR>&nbsp;SELECT Survey.ID<BR>&nbsp;FROM=20
Survey<BR>&lt;/CFQUERY&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&lt;HTML&gt;&lt;HEAD&gt;<BR>&nbsp;&lt;TITLE&gt;Survey=20
Results&lt;/TITLE&gt;<BR>&lt;/HEAD&gt;&lt;BODY =
bgcolor=3D"ffffff"&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;FONT size=3D"+1"&gt;Survey =
Results&lt;/FONT&gt;=20
&lt;BR&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;cfoutput=20
query=3D"TotalRecord"&gt;<BR>#Currentrow# of =
#TotalRecord.RecordCount</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;/cfoutput&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ethan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0075_01C0376E.73531990--

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to