This topic is locked

LOG of delete

7/1/2009 5:52:03 PM
PHPRunner General questions
F
fbrashich author

Hi...
i'm using PHPR 5.0 - b766
i'm making a syslog to record all trassactions of the system.

So...
if i ADD new record, i use AFTER ADD

if i EDIT a record, i use AFER UPDATED
but when i delete a record, i don't have a AFTER DELETE.
In my events i don't have the option to catch the delete event.
How can i do to log this transsaction?

F
fbrashich author 7/1/2009
F
fbrashich author 7/1/2009

http://www.xlinesoft.com/phprunner/docs/in...ord_deleted.htm


Another question...
there is any way to get the values deleted when i do a mass deletion ??? o just de nomber of records deleted?
Thanks any way!!!

J
Jane 7/2/2009

Hi,
field values are stored in the $deleted_values array in the After record deleted event.

Here is a sample:

echo $deleted_values["FieldName1"];

echo $deleted_values["FieldName2"];

echo $deleted_values["FieldName3"];

F
fbrashich author 7/2/2009

Hi,

field values are stored in the $deleted_values array in the After record deleted event.

Here is a sample:


$deleted_values is only available in "After record deleted", but not in "After group deleted" event.

the only variable i have to process is $deleted_records, wich is a number with the total count of deleted records.
so... when i delete 2 records, the event "After Record Deleted" is not executed, so i can't catch de values deleted.
there is any way to cath them or restric mass deletion to delete one by one record?
Thanks in advance!!!

J
Jane 7/3/2009

Hi,
use Before record deleted event for this purpose.

Here is a sample:

$_SESSION["numberofrecords"]++;


You can declare $_SESSION["numberofrecords"] in the List page: Before process event:

$_SESSION["numberofrecords"] = 0;



and then print it in the After group deleted event:

echo $_SESSION["numberofrecords"]." records deleted";