Updating multipile rows from an order history form ( ie same id)
From: Shane C (sclay_at_ceinternet.com.au)
Date: 02/10/04
- Previous message: James: "Advice Needed : Nasty Problem PHP/MS SQL Server and Varchar fields > 255 in Length"
- Next in thread: Marcel: "Re: Updating multipile rows from an order history form ( ie same id)"
- Reply: Marcel: "Re: Updating multipile rows from an order history form ( ie same id)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Feb 2004 20:40:01 -0800
Hello,
I have a database with 4 tables;
CUSTOMERS PRODUCTS ORDERS ORDERDETAILS
custid* productid* orderno* orderno
name productname custid productid
address salesprice campaign date
phone costprice quantity
age
I have forms to interact with the database to add/search/display etc.
These work fine.
I am now working on UPDATE, but am having some problems on how to
approach.
I have a display form that successfully pulls data from the table and
displays the order history for each customer eg.
OrderNo ProdID Campaign Date Product Quantity Salesprice
2 22345 2 2004-01-20 Soap 1 1.95
25 98678 4 2004-02-24 Perfume 1 15.95
38 09656 5 2004-03-20 Candle 2 7.50
How do I approach updating the details in the above form. I have a
hidden form field 'custid' to link the data, but am not sure how to
specify the update for whichever rows are altered. eg. If I update row
1 'quauntity' = 2 and row 3 'campaign' = 6, how do I do it so it
doesn't update all the rows with this updated data? With some sort of
array?
- Previous message: James: "Advice Needed : Nasty Problem PHP/MS SQL Server and Varchar fields > 255 in Length"
- Next in thread: Marcel: "Re: Updating multipile rows from an order history form ( ie same id)"
- Reply: Marcel: "Re: Updating multipile rows from an order history form ( ie same id)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|