This topic is locked

Time and Other Questions

3/21/2009 10:11:33 PM
PHPRunner General questions
G
Greeham author

Hi,
I have a question:-
I have a table that has a user_id field and a time field.
An application a friend has made for me allows the time field to update amount of time they are logged on for but my bit is to be able to:-
A) Add time manually.
So, how, using PHPRunner and the after add function can I get it to increase the total time against a user_id if required?
Thanks,
Graham

J
Jane 3/23/2009

Graham,
to update fields in the After record added event use following code as a sample:

global $conn;

$strUpdate = "Update tablename set fieldname=".$values["fieldname"]." where keyfield=".$keys["keyfield"];

db_exec($strUpdate,$conn);


If you use latest PHPRunner 5.0 you can use DAL in your code:

http://www.xlinesoft.com/phprunner/docs/da...ccess_layer.htm