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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to link the price of a product from a database

Status
Not open for further replies.

rax369

Technical User
Jul 21, 2002
3
Hi I'm trying to make this simple application where a user can customize his/her PC in a reseller web site.

pc_customization.GIF


As you can see, what a wanna achieve is to show the price of the product at its side below le column Price , as the example given with the motherboard. Once the user has selected X product, the price has to be shown immediately in the TextField. The price will be taken from a database I already made.

I'm giving you the info about the database I have.

DataBase Name: Test01
Table: products
Field inside the table 'products': 6 (as follows)

* Code ( code of the product assigned by the reseller )
* ProdName ( name of the product )
* Category ( category to which the product belongs... e.g.: monitors, motherboards, mouse, processors, etc. )
* Brand ( the brand of the product... e.g. Intel, viewsonic, logitech, etc. )
* Provider ( the name of the reseller's provider )
* Price ( price of the product )

The price of the products have to be summed and showed at the end of the column Price, at the side of TOTAL.

I has been only able to get the info of the motherboard from the table products, and show it in the List/Menu using this SQL query :

SELECT PRODNAME
FROM TEST01.PRODUCTS
WHERE CATEGORY LIKE 'MOTHERBOARDS'


But I don't know how to link the price of every product from the database, and put it inside of the textbox.

I'm stucked trying to make this exercise for my learning. Thx for any help.

R@x
 
try the ASP forum here
forum333 this here they will be more helpful...but what it seems like is that when you have someone choose a product you want to refresh the price form field to reflect what the product would be

so something along the line of select*price where price==products...but this isnt right but something along this and then this code would also come after you put a refresh command in the product drop down menu where you would target your price field.

umm hope this gets you on the path somewhat

[afro] whos that behind you?
 
Yep deecee you are on the right lines. What you are after is a dynamic dropdown that feeds a text box. I had the script somewhere but cant find it at the moment. The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top