|
BeTheBall -> 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>
|
|
|
|