I’ve been at this for hours and nothing is working, so your help is greatly appreciated.
I have a table that is dynamically filled with invoices that need a supervisor’s approval. I’m trying to create the ability for a supervisor to click an ‘Approve’ all button and have the MySQL table column update with the supervisor’s ID for each of the invoices (which have their own unique Job ID in the MySQL table).
I’ve tried things such as: a while loop that places each job ID in an array, a loop that inserts each ID and passes it to another page using ‘get’, along with a number of other overly complex solutions.
It seems like there would be a simple way to do this that I’m missing.
Because nothing is working, I don’t have a lot of code to show, but here is the query that will update the table. This is what I’m using to approve a single invoice, what I need is the ability to approve all the invoices that show on the page.
UPDATE jobs
SET job_approverid2='”.$approverid.”‘
WHERE job_id = ‘”.$jobid.”‘
Multiple rows update, I’m asuming you have multiple job_ids