With an INSERT, I am currently creating new invoices with each row, but I also want each new invoice number to increment. I have no naming system for the invoices other than 1, 2, 3, 4, 5.
The one condition I have is that the invoices have to be associated to a job number.
I.e.
In table val_valuations, fields:
valuation_id is the primary, auto incrementing field
valuation_job refers to the job number
valuation_request refers to the invoice number
Each job will have a series of invoices from 1 to whatever number, but they will also increment from 1.
This is my current INSERT statement:
mysql_query("INSERT INTO val_valuations (valuation_job, valuation_man, valuation_mw, valuation_var, valuation_dw, valuation_date) VALUES('".$_POST["job"]."', '".$_POST["mukman"]."', '".$_POST["mworks"]."', '".$_POST["vos"]."', '".$_POST["dayworks"]."','$date') ") or die(mysql_error());
echo "Valuation successfully created.";
How best can I do this?