![]() |
Sergey Kornilov admin 7/24/2007 |
Use BeforeEdit event and the following code: $values["field 2"]=now(); |
F
|
funkfish author 7/25/2007 |
Use BeforeEdit event and the following code: $values["field 2"]=now();
|
M
|
morpheus 7/25/2007 |
Funkfish, |
B
|
Blooper 9/21/2007 |
Funkfish, in my database I needed to keep an audit trail, so rather than just editing the records i make a copy using the copy function, in after add I set a field called "current" to "false", the new record has the "current" field set to "true", I also have a field that I set to keep a log of who edited the records which can be obtained by $_SESSION["UserID"], I also date/time stampa field that shows when a record was edited, This allows me to keep a complete history of all changes made to the database, when and by whom. There are two tables, one for all records(including historic) and one for only current records (done by editing the SQL query to only pull out the records where "current" = true) If you have any questions regarding this hen I'll be happy to help <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21560&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> regards Morpheus
|
![]() |
Sergey Kornilov admin 9/21/2007 |
Use BeforeRegister event and the following code: $userdata["date_join"] = now(); |