aka_FATCAT
asked on
Update one or more rows in one step.
First page queries the database for open invoices, the user selects one or more invoices and presses submit.
The second page displays the invoice numbers and the total for all invoices selected.
The user then selects the payment form and submits.
Im having trouble figuring out how to update the invoice status to paid.
UPDATE invoice
SET invoice_status = '1'
SET balance = '0'
WHERE inv_id = '#FORM.invoice_id#'
How can i make it loop through all the selected invoices and update them all.
Thanks.
The second page displays the invoice numbers and the total for all invoices selected.
The user then selects the payment form and submits.
Im having trouble figuring out how to update the invoice status to paid.
UPDATE invoice
SET invoice_status = '1'
SET balance = '0'
WHERE inv_id = '#FORM.invoice_id#'
How can i make it loop through all the selected invoices and update them all.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i had it there for testing, the line is not needed. sorry for the confusion
ASKER
That sort of works.
The problem is that the form is on one page that when submitted displays the information on a conformation page. The user then chooses the payment method and submits the form.
So I will need to store the invoice_id's somewhere for it to be used when the second form is submitted.
Thanks
The problem is that the form is on one page that when submitted displays the information on a conformation page. The user then chooses the payment method and submits the form.
So I will need to store the invoice_id's somewhere for it to be used when the second form is submitted.
Thanks
put a hidden formfield on your confirmation page.
<input type="hidden" name="invoice_id" value="#FORM.invoice_id#" />
ASKER
Ahhh, my level of ignorance has been upgraded to master level.
Thank you.
Thank you.
ASKER
Simply elegant.
ASKER