I have only one column in a database that I need to "divide", preferably in half, but this will not be possible if I have an odd number of records. I want to output 1/2 of column 1 in its own html table, and I'd like to output the other half of column 1 in its own html table, on separate parts of the page. These HTML tables will be independent of each other because there will be information on the web page in between these two html tables.
Do I need two queries, instead of one??
Therefore it would be something like this:
<td>
<table><!---1/2 of column 1 on left side of page--->
A
B
C
</table>
</td>
Thanks For Your Response. I was unaware of the startrow and maxrow features (I am a newbie!).
Someone on another list answered this for me in a similar fashion.
I'll post for anyone else having a similar problem:
<!--- Get the data --->
<cfquery name="qryName" ..>
SELECT *
FROM tblName
</cfquery>
<!--- Set vars --->
<cfset locTotalRecordCount=qryName.RecordCount>
<cfset locMaxRows=Ceiling(locTotalRecordCount / 2)>
<cfset locStartRow=1>
<td>
<table><!---1/2 of column 1 on left side of page--->
<cfoutput query="qryName" startrow="#locStartRow#" maxrows="#locMaxRows#">
<tr><td>#qryName.var#</td></tr>
<!--- Increment the locStartRow var --->
<cfset locStartRow=locStartRow + 1>
</cfoutput>
</table>
</td>