This topic is locked

Totaling deleted records

7/6/2006 2:20:57 AM
PHPRunner General questions
kujox author

I have a series of records and each has a currency value.
How could I total up the value of the records that are to be deleted.
Or where could I find out the key field values of the records to be deleted so I could just query the values before deletion.

J
Jane 7/6/2006

Chris,
use List Page: OnLoad, After record deleted and After group of records deleted events. Here is sample code for these events:

function ListOnLoad($strSQL)

{

$_SESSION["deletecount"]=0;

}


function AfterDelete()

{

$_SESSION["deletecount"]++;

}


function AfterMassDelete()

{

echo $_SESSION["deletecount"]." record(s) deleted";

}

kujox author 7/7/2006

Thanks Jane, that works fine.