Hi,
I want to write a function which I can use in the AfterUpdate event for different tables.
One way is :
$fieldnames = array("name", "email", "age" ,"gender" );
foreach ($fieldnames as $field) {
if($values($field)!=$oldvalues($field)
{
//execute sql for insert into log table
}
}
The problem is I need to know the fieldnames and have to put them into an array first,
but for writing a global function this is not helpful.
I am looking for something like in javascript to receive the names :
$fieldnames = rowData.fields ; (retrieving the fieldnames in the Afterupdate event)
// and than I process them
foreach ($fieldnames as $field) {
if($values($field)!=$oldvalues($field)
{
//execute sql for insert into log table
}
}