shawntbanks
Programmer
I want to be able to select on of the vehicles from the drop down menu and have it go to a new page where you can enter information about that vehicle.
<cfquery datasource="market" name="getvehicles">
select subcategory as vehicletype
, count(*) as vehicles
from adds
where subcategoryid in
( 1 -- cars
, 2 -- trucks & Vans
, 3 -- Boats & Watercraft
, 4 -- Motorcycles
, 5 -- RV's
, 6 -- SUV's
, 7 -- Snowmobiles
, 8 -- Auto Accessories
, 9 -- Farm Equipment
, 10 -- Heavy Equipment
, 11 -- Other
)
group by subcategory
order by subcategory
</cfquery>
<cfset totalvehicles
= ArraySum(ListToArray(
ValueList(getvehicles.vehicles)))>
<body>
<form><tr valign="top"><td><p><strong>Vehicles:
(<cfoutput>#totalvehicles#</cfoutput>
listings)</strong></p></td></tr>
<tr><td><select name="Vehicles" size="1">
<option>--- Choose One ---</option>
<cfoutput query="getvehicles">
<option>#getvehicles.vehicletype#
(#getvehicles.vehicles# listings)</option> </cfoutput></select></form>
<cfquery datasource="market" name="getvehicles">
select subcategory as vehicletype
, count(*) as vehicles
from adds
where subcategoryid in
( 1 -- cars
, 2 -- trucks & Vans
, 3 -- Boats & Watercraft
, 4 -- Motorcycles
, 5 -- RV's
, 6 -- SUV's
, 7 -- Snowmobiles
, 8 -- Auto Accessories
, 9 -- Farm Equipment
, 10 -- Heavy Equipment
, 11 -- Other
)
group by subcategory
order by subcategory
</cfquery>
<cfset totalvehicles
= ArraySum(ListToArray(
ValueList(getvehicles.vehicles)))>
<body>
<form><tr valign="top"><td><p><strong>Vehicles:
(<cfoutput>#totalvehicles#</cfoutput>
listings)</strong></p></td></tr>
<tr><td><select name="Vehicles" size="1">
<option>--- Choose One ---</option>
<cfoutput query="getvehicles">
<option>#getvehicles.vehicletype#
(#getvehicles.vehicles# listings)</option> </cfoutput></select></form>