Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Column From List.. 1

Status
Not open for further replies.

bataraguru

Programmer
Jun 4, 2002
37
0
0
MY
Hi,
I manages to get this code from a tutorial site..
basically, i wanted to display exactly 3 columns from 3 CarID in the list.
Code:
<Table border="1" width="100%">

    <cfloop list="#Form.CarID#" index="ID" delimiters=",">
	<tr>
	<cfparam name="startrow" default="0">
	
<cfquery name="unique_query#ID#" datasource="Autoworld">
SELECT * FROM CarSpec
WHERE CarID = #ID#
</cfquery>
	

<cfoutput query="unique_query#ID#" startrow="#startrow#" maxrows="3">
<td width ="33%">#Model# - #CC#<br>#Fuel#<br></td>
</cfoutput>
<cfset startrow = #startrow# + 3>
</tr>
</cfloop>
</Table>
the code above dont any syntax error, but i only manage to display 1 from 3 of CarID in the list. what i have done wrong? Please help. thanks in a million...

Thanks..
- zaidi -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top