I'm not too sure which forum to ask, so i'll do this and asp. Hello all. I have a database with 4 tables,
---------------------------------
Categories:
CategoriesID (primary key)
Categories (text)
----------------------------------
Products:
ProductID (primary key)
Manufacturer (text)
PartNumber (text)
Description (memo)
CategoriesID (foreign key)
----------------------------------
Jobs:
JobCode (primary key
JobStatus (text)
Etc. Etc....
----------------------------------
Orders:
OrdersID (primary key)
ProductID (foreign key)
JobCode (foreign key)
Quantity (text)
----------------------------------
I have an asp page with a table containing 4 cells. The first 3 cells are populated with data pulled form the Products table in the database with this sql statement.
SELECT * FROM Products WHERE CategoriesID=1
That will pull and display all of the data from a category in the products table. that part is working fine. the first 3 cells display the information, Manufacturer, PartNumber, Description, with no problem.
In the 4th cell I placed a form tag, and a text box to update the quantity field in the orders table with whatever quantity is entered into the textbox. Now here's the part i'm getting lost on. how do i update the quantity field in the orders table, and have it related to the JobCode? Here's the logic (or lack thereof) of the system.
i have a page that list's all the jobs. From there you click on a JobCode (hyperlink = products.asp?JobCode=<%=rsPSS("JobCode"
%>) and it'll take you to another page listing all the product categories (widgets, lightbulbs, etc. etc....) From there you click a category (widgets for example) next you go to a page that lists all the widgets, from here you can enter the quantity you want. Now how can i make it so the orders table is updated with the quantity of widgets you entered and have the JobCode updated as well with the JobCode you selected at the beginning? sorry guys i'm in this one so deep i can't see the answer clearly.
---------------------------------
Categories:
CategoriesID (primary key)
Categories (text)
----------------------------------
Products:
ProductID (primary key)
Manufacturer (text)
PartNumber (text)
Description (memo)
CategoriesID (foreign key)
----------------------------------
Jobs:
JobCode (primary key
JobStatus (text)
Etc. Etc....
----------------------------------
Orders:
OrdersID (primary key)
ProductID (foreign key)
JobCode (foreign key)
Quantity (text)
----------------------------------
I have an asp page with a table containing 4 cells. The first 3 cells are populated with data pulled form the Products table in the database with this sql statement.
SELECT * FROM Products WHERE CategoriesID=1
That will pull and display all of the data from a category in the products table. that part is working fine. the first 3 cells display the information, Manufacturer, PartNumber, Description, with no problem.
In the 4th cell I placed a form tag, and a text box to update the quantity field in the orders table with whatever quantity is entered into the textbox. Now here's the part i'm getting lost on. how do i update the quantity field in the orders table, and have it related to the JobCode? Here's the logic (or lack thereof) of the system.
i have a page that list's all the jobs. From there you click on a JobCode (hyperlink = products.asp?JobCode=<%=rsPSS("JobCode"