Link to home
Start Free TrialLog in
Avatar of Mike Waller
Mike WallerFlag for United States of America

asked on

display query output in columns and rows

How can I display the output in a table so that it's 4 down with 3 rows across or 4 down with 4 rows across:

<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfparam name="PageNum_myquery" default="1">
<cfquery name="myquery" datasource="dsn">
SELECT *
FROM listings
where status = 'active'
order by MyIdentity asc
</cfquery>
<cfset MaxRows_myquery=4>
<cfset StartRow_myquery=Min((PageNum_myquery-1)*MaxRows_myquery+1,Max(myquery.RecordCount,1))>
<cfset EndRow_myquery=Min(StartRow_myquery+MaxRows_myquery-1,myquery.RecordCount)>
<cfset TotalPages_myquery=Ceiling(myquery.RecordCount/MaxRows_myquery)>
<cfset QueryString_myquery=Iif(CGI.QUERY_STRING NEQ "",DE("&"&XMLFormat(CGI.QUERY_STRING)),DE(""))>
<cfset tempPos=ListContainsNoCase(QueryString_myquery,"PageNum_myquery=","&")>
<cfif tempPos NEQ 0>
  <cfset QueryString_myquery=ListDeleteAt(QueryString_myquery,tempPos,"&")>
</cfif>
<cfoutput query="myquery" startrow="#StartRow_myquery#" maxrows="#MaxRows_myquery#">#short_note#<!--- <img src="props/#photo_main#" width="648" height="6" border="" alt=""> ---><br><br></cfoutput>
ASKER CERTIFIED SOLUTION
Avatar of dgrafx
dgrafx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial