T
|
Tempus_Erus author 6/13/2010 |
This is relation to my previous post! I used the current record ID and have that inserted into invoice items. All works fine. This creates the link between invoice details and each invoice item. global $conn $strSQLInsert = "insert into invoice_items (invoice_id) values ($keys[id])"; db_exec($strSQLInsert,$conn); this is in 'after record added'. What I want to do is add the current ID above into a different field in the same table the id was produced. Currently I tried also in 'after record added' : global $conn; $strSQLInsert = "insert into invoice_items (invoice_number) values ($keys[id])"; db_exec($strSQLInsert,$conn); but this produces another record though with the correct ID and does not insert the ID into the invoice number field. Can not both of the scripts be in after record added? Any help apprecited. Have I overcomplicated this again!!!
|