H
|
HMIS 2/10/2008 |
I need some clarification. I am trying to added data to another table once a new record is added on the first table. I have the event, after record added with the following code: //** Insert a record into another table **** global $conn; $strSQLInsert = "insert into encounter (id, customer, contact) values (.$values["customerid"], .$values["companyname"], .$values["contactname"])"; db_exec($strSQLInsert,$conn); But this does not work and I totally cannot figure it out. customerid, companyname, and contact name are the field names of the new record being added in the first table.. I want the values for those field to poplulate fields id, customer, and contact in the second table. Thanks in advance!!!!!!
|
J
|
jclout 2/10/2008 |
It looks like your missing a " Try replacing (.$values["customerid"], .$values["companyname"], .$values["contactname"])"; with (".$values["customerid"], .$values["companyname"], .$values["contactname"])"; Let me know if it works
|
A
|
alang 2/11/2008 |
Try: |