This topic is locked

Save values twice

7/13/2006 3:54:37 AM
PHPRunner General questions
D
dieter author

In my table persons there are fields Name, Age, Street, ...

And there is a field Alltogether.
When on persons Add page I click on Save I want to have Name, Age ... also to be saved (joined) in the field Alltogether.
When I use before Add there is always an empty tablerow with only Alltogether filled.
Greets Dieter

J
Jane 7/13/2006

Hi,
try to use following code for the BeforeAdd event:

function BeforeAdd(&$values)

{

$values["Alltogether"]="concat(".$values["Name"].",'
',".$values["Age"].",'
',".$values["Street"].")";

return true;

}