navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Separate results into multiple table sequence

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Separate results into multiple table sequence
Page: [1]
 
nettop

 

Posts: 210
Joined: 2/9/2004
Status: offline

 
Separate results into multiple table sequence - 3/29/2008 14:48:21   
I am using the DRW to generate results of a database at http://www.foothillbiz4sale.com/donedeals.asp . Instead of showing the results in one continuous table, I'd like to separate the data and show 3 tables per row, with a space and repeat another 3 tables in the next row showing unique data ID in each of the tables. Hopefully, you can see that I just want to format my results differently but don't know how I can put them in separate, repeating tables. Please help. Thanks, Tim
BeTheBall

 

Posts: 6336
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Separate results into multiple table sequence - 3/29/2008 21:34:53   
Here's a little example I threw together. I have bolded the key points. The key is to make the starting count and the number following "mod" be the same. If in my example below you change the number 3 to 4 each time it occurs, you will get 4 items per row. Hope this helps.

<!--#include file="_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM Results"
fp_sDefault=""
fp_sNoRecords="No records returned."
fp_sDataConn="test"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Type=202&Make=202&Model=202&YearBuilt=202&Color=202&Mileage=202&Classification=202&Price=3&BookValue=3&1-5 rating=3&"
fp_iDisplayCols=11
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
count=3
%>
<table cellspacing="5" cellpadding="5">
<tr>
<td>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<%
count=count+1
if count mod 3 = 1 then
response.write("</td></tr><td>")
else
response.write("</td><td>")
end if
%>
<table border="1">
  <tr>
    <td><b>ID:</b></td>
    <td>
    <%=FP_FieldVal(fp_rs,"ID")%> </td>
  </tr>
  <tr>
    <td><b>Type:</b></td>
    <td>
    <%=FP_FieldVal(fp_rs,"Type")%> </td>
  </tr>
  <tr>
    <td><b>Make:</b></td>
    <td>
    <%=FP_FieldVal(fp_rs,"Make")%> </td>
  </tr>
  <tr>
    <td><b>Model:</b></td>
    <td>
    <%=FP_FieldVal(fp_rs,"Model")%> </td>
  </tr>
</table>
<!--#include file="_fpclass/fpdbrgn2.inc"-->
</td>
</tr>
</table>


_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to nettop)
nettop

 

Posts: 210
Joined: 2/9/2004
Status: offline

 
RE: Separate results into multiple table sequence - 3/30/2008 1:05:17   
Very cool!!! It worked perfectly. Now, I just need a little formatting. THANKS so much for your help. You can see the first (not formatted yet) results at http://www.foothillbiz4sale.com/donedeals.asp . Thanks again...I really appreciate your insights and help, Tim

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Separate results into multiple table sequence
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts