This topic is locked

Addition to Edit page: After record updated event

11/20/2008 7:36:14 AM
PHPRunner General questions
buddy author

I have the following in the After record update Event for the Edit page:
global $conn;
$strSQLInsert = "insert into Comments (DID,User,Date,Comment) values ('" . $values["DID"]. "','" . $values["DriverAuthor"]. "','" . $values["LastModifiedDate"]. "','" . $values["Enter Comment"]. "')";
db_exec($strSQLInsert,$conn);
$strUpdate="UPDATE DataPath_Outsourcer SET New_OS_Comments = concat(`DriverAuthor`,' - ',`Enter Comment`)";
db_exec($strUpdate,$conn);
This works great. I am trying to make an addition to the above that clears the "Enter Comment" field after the strUpdate happens.
Your help is appreciated.

buddy author 11/20/2008

Jane answered through support and works perfectly:
$strUpdate="UPDATE DataPath_Outsourcer SET New_OS_Comments = concat(`DriverAuthor`,' - ',`Enter Comment`), `Enter Comment`=''"; db_exec($strUpdate,$conn);