navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

DRW Help needed

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> DRW Help needed
Page: [1]
 
64mustang

 

Posts: 4
Joined: 8/30/2004
Status: offline

 
DRW Help needed - 8/30/2004 20:51:42   
I have a database which contains the following fields,

ID
Category (different product types)
product_name (has multiple same names)
design_number (a unique number for each product type and name)
detail

I have a category selection page that lists all product types
listed in the database. When a category is selected, it takes you
to a page that displays all of the products from the category
selected. When a product is selected on this page,
it takes you to a details page.

All is working fine to this point. Now what I
would like to do is create an additional DRW on the details page that will display items listed in the product name field that have the
same product name (same name, different category).
For example, category is "Floor Lamp" and product name is "Rachel".
When the Rachel picture is selected, the details page
has details about the Rachel Floor Lamp.
I would like the details page to also
display the other lamps in the Rachel product line,
such as Table Lamps and Hanging Lamps (other category types).
I have been unable to get the correct results
and have no idea what to try next.

Any help or suggestions will be greatly appreciated.
BeTheBall

 

Posts: 6355
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: DRW Help needed - 8/30/2004 22:12:22   
Welcome to OutFront.

To do what you want, you first need to be sure that the Product Name is available outside the DRW that displays the details. Assuming you get to the details page via a hyperlink, include a parameter in that link for the product name. So, if your hyperlink is currently:

details.asp?ID=<%=FP_FieldURL(fp_rs, "ID")%>

change it to:

details.asp?ID=<%=FP_FieldURL(fp_rs, "ID")%>&product_name=<%=FP_FieldURL(fp_rs, "product_name")%>

Then the SQL to retrieve the other available categories would be something like:

SELECT DISTINCT Category FROM tblName WHERE product_name = '::product_name::'

The use of DISTINCT will prevent duplicates.

Good luck.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to 64mustang)
64mustang

 

Posts: 4
Joined: 8/30/2004
Status: offline

 
RE: DRW Help needed - 8/31/2004 15:20:16   
Thanks Duane.

That worked! Appreciate you help.

Now you have my curiosity getting the best of me.
So, now I do have a couple of additional questions. Is it possible to use "Like" instead of the "= " to return product_name that contains "Rachel"? Example "Rachel" and "Rachel square"

The other question is. I see it is possible to retrieve the ID
number for the category also. It is possible to use it to link to another detail page? Or am I going to far?

Once again, thank you for all your help.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6355
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: DRW Help needed - 8/31/2004 15:35:14   
quote:

Now you have my curiosity getting the best of me.
So, now I do have a couple of additional questions. Is it possible to use "Like" instead of the "= " to return product_name that contains "Rachel"? Example "Rachel" and "Rachel square"


Yes. SELECT DISTINCT Category FROM tblName WHERE product_name LIKE '%::product_name::%'

quote:

The other question is. I see it is possible to retrieve the ID
number for the category also. It is possible to use it to link to another detail page? Or am I going to far?


Don't see any reason you couldn't do that.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to 64mustang)
64mustang

 

Posts: 4
Joined: 8/30/2004
Status: offline

 
RE: DRW Help needed - 8/31/2004 15:53:53   
Thanks again!

Could you give me some more insight on how you would go about
retrieving the ID to use for the link. I can see the ID number by using <%=FP_FieldURL(fp_rs,"ID")%> in the DRW. But when I use
details?ID=<%=FP_FieldURL(fp_rs, "ID")%> nothing happens.

Thanks again you your help.

(in reply to BeTheBall)
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW Help needed - 8/31/2004 16:11:47   
Whats the full code you are using for the link?
This code should suffice?

<a href="details?ID=<%=FP_FieldURL(fp_rs, "ID")%>">Details</a>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to 64mustang)
64mustang

 

Posts: 4
Joined: 8/30/2004
Status: offline

 
RE: DRW Help needed - 9/1/2004 7:41:13   
Thanks Spooky and Duane for all your help. I think I now have everying working correctly.

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> DRW Help needed
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts