This topic is locked

update table in print section

6/6/2008 1:42:47 PM
PHPRunner General questions
R
rainerwolf author

Hi,
i want to make an update in an table, when i have print an record and it must be with a "where" clause.
It works on Edit Record with the following code:
$strUpdate = "update oe_vorgang1 set gedruckt_eltern_am = now()

where id=".$values["id"] ;

db_exec($strUpdate,$conn);
But not on Print, because their is no: function AfterEdit(&$values, $where, &$oldvalues, &$keys,$inline)

only: function BeforeMoveNextPrint(&$data,&$row,$col);
What can i do?
Rainer

J
Jane 6/7/2008

Rainer,
use Print page: Before SQL query event for this purpose.

Here is a sample:

global $conn;

$strUpdate = "update oe_vorgang1 set gedruckt_eltern_am = now() where (".$strWhereClause.")";

db_exec($strUpdate,$conn);

R
rainerwolf author 6/9/2008

Thanks, Jane

it works