PDA

View Full Version : coldfusion help


gcapp
05-08-2003, 04:26 PM
I am very new to Coldfusion and I was wondering if someone may point me in the right direction.

I have an Access database that holds the records of all the live music shows that I have from 4 different artists. I created a Coldfusion page that allows the user to search the table based on choosing from one of 3 drop-down lists (city, date and tour.) When choosing from one of those lists, the results show on that page. The way it is now, it searches all artists in that table.

My question is: In my table there is a field called Artist. In that field, there are 4 different artists.

I don't know the code how to do this, but is there a way that I can list the 4 artists on a page and have it where if you click on a link for one of those artists, the page will only search within that artist, not all artists like it does now?

If someone needs to see an example, go to
Click on Live Audio and there you can see how you can choose from the 3 menus. What I would like to do - is where you see the four names above the drop-downs, have it where you can click on one of those names and then use the menus, but the it will only search based on the artist you just clicked.

If anyone has any ideas at all, I would greatly appreciate it.

Gary

CFMX RULES
05-28-2003, 01:12 AM
hope this helps (i used the example apps db with cfmx)

test.cfm
----------

<cfquery name="Categories" dataSource="exampleapps">
select CategoryID, CategoryName
from tblCategories
order by CategoryName
</cfquery>
<form name="test" method="post" action="test2.cfm">
<table>
<tr>
<cfoutput query="categories">
<td><a href="test2.cfm?categoryid=#CategoryID#">#CategoryName#</a></td>
</cfoutput>
</tr>
</table>
</form>


test2.cfm
-----------

<cfif isDefined("url.categoryID")>
<cfset form.categoryID = url.categoryID>
</cfif>
<cfparam name="Form.categoryID" default="">
<cfquery name="qItems" dataSource="exampleapps">
select ItemName,
ItemID
from tblItems
where CategoryIDFK = '#FORM.categoryID#'
</cfquery>

ITEMS: <select name="ItemID" size="1">
<cfoutput query="qItems">
<option value="#ItemID#">#ItemName#</option>
</cfoutput>
</select>