This topic is locked
[SOLVED]

 PHPRunner 6 - Unable to update records with code

10/6/2011 5:07:29 AM
PHPRunner General questions
W
wypman author

I have added some code to read only fields that automatically updatedi.e.

$values["edited_timestamp"] = now();

$values["edited_by"] = $_SESSION["UserID"];


It worked under version 5.3 when placed under the Before Process event but it no longer seems to update.
Has anything changed in PHPRunner Version 6.
I've tried it under other events as well...

C
cgphp 10/6/2011

Chek if your fields name are correct. Valid events for your code are the "Before record added", "After record added", "Before record updated", "After record aupdated" adn "Process record values".

W
wypman author 10/6/2011

Cristian,
Thanks for your assistance. I had typed the values in lowercase, as they appear in the mysql database table. I right clicked on the field, and pressed properties, the fields were listed as Edited_timestamp and Edited_by.
I also attached the code to the 'Before record Added' event and it seems to be working fine.
Thanks