Query results display help
Hello
I'm having a issue with displaying the results of my query output.
When I cfloop over the results.. the part number is being output on 3 different rows... when I want it on one row querying multiple tables.. and you cant use the group option with the cfloop
here is the query
<cfquery datasource="wire" name="testss3">
SELECT a.part AS pparts, a.wireid AS wireidA, a.strnds, a.wt, a.sps1, a.sps2, a.sps3, a.tin, b.slookup AS lid, b.wireid AS wireidB, b.reelid AS reelnmbr, d.reelid AS rlid, d.rname, d.rsku, d.rcost, e.plookupid, e.prctid, e.wireid AS wireidE, f.prctid, f.percentage, g.rsize
FROM Mpart a, slookupt b, reeltbl d, prctlup e, prct f, spoolsize g
WHERE a.wireid = b.wireid AND e.prctid = f.prctid AND a.wireid = e.wireid AND b.reelid = d.reelid AND g.spoolSizeid = b.spoolSizeid
</cfquery><table border="1" border="1">
<tr>
<td></td>
<td bgcolor="#CCCCCC" class="style23">Part No. </td>
<td bgcolor="#CCCCCC" class="style23">Wt./Mft.</td>
<td bgcolor="#CCCCCC" class="style23" colspan="3">Spool Sizes (Cost/ft.)</td>
<td> </td>
</tr>
<cfloop query="testss3"><cfoutput>
<tr>
<td></td>
<td align="left" class="style23">#pparts# @</td>
<td align="left" class="style23">#wt#</td>
<td align="left" class="style23">
#rsize# #rcost# #wireidA#</cfoutput></cfloop></td>
<td> </td>
</tr>
</table>
| Part No. | Wt./Mft. | Stock Spool Sizes (Cost/ft.) | ||||
| 10 sol @ | 31.43 | 1000 2.8000 1 | ||||
| 10 sol @ | 31.43 | 2500 5.9800 1 | ||||
| 10 sol @ | 31.43 | 5000 7.3000 1 | ||||
| 10T @ | 31.43 | 1000 2.8000 2 | ||||
| 10T @ | 31.43 | 2500 5.9800 2 | ||||
| 10T @ | 31.43 | 5000 7.3000 2 | ||||
| 8 sol @ | 50 | 500 2.8000 4 | ||||
| 8 sol @ | 50 | 1000 5.9800 4 | ||||
| 8 sol @ | 50 | 5000 7.3000 4 | ||||
| 8T @ | 50 | 500 2.8000 5 | ||||
| 8T @ | 50 | 1000 5.9800 5 | ||||
| 8T @ | 50 | 5000 7.3000 5 | ||||
the first row should read 10 sol | 31.43 | 1000 | 2500 | 5000
the next row 10T | 31.43 | 1000 | 2500 | 5000
Any help would be much appreciated!
Thanks!
