Searching unrelated tables via join query / Linking to different "detail" pages depending on table particular result is from
Posted on 2007-03-23
Hi! I have a search engine on my site where I need to return results from several different tables that are NOT related. This is a furniture site so i have a table for the actual furniture, available fabrics, top finishes and availabe trims. The database is in MS Access so I wrote a query in access to join all 4 of the tables. I then created a recordset in Dreamweaver to search that query and return the results through a repeat region. That is working great. Here is my problem...
Each item that comes up in the repeat region on the results page has a thumbnail image and a style number. Each of these link to the "details" page for that particular ID. That is working fine for the Furniture. But when I click on a Finish, Fabric or Trim in the results page, it sends the right ID number but pulls the result from the Furniture Table. What I need to do is have 4 separate detail pages (which I already have built) and go to them depending on which item is clicked. How can I achieve this? As the Query does not have any info as to the table name how can I differentiate between them?
Here is the link code that is on the thumbnail and style number for each item in the results page:
Detail.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & "ID=" & rsFC.Fields.Item("SearchID").Value %>
Furniture results should be sent exactly as is but:
- Fabric results should be sent to LargeFabric.asp instead of Detail.asp
- Finish results should be sent to LargeFinish.asp
- Trim results should be sent to LargeTrim.asp