This topic is locked
[SOLVED]

 Date and Time Stamp Record Creation

10/15/2005 8:15:54 PM
PHPRunner General questions
jimhnet author

How can I put a date and time stamp on record creation in phprunner.
Jim Freeman

admin 10/17/2005

Hi,
add Date/Tame field to your database.

Proceed to Formatting tab in PHPRunner and setEdit as - Text field or Edit as - Hidden field format for this field with default value now()

O
omegix 11/2/2005

Hi, I attempted this, but it did not work for me.
in database:

LastUpdated is of type DATETIME and is a NULL
In phpRunner:

LastUpdated is Viewas 'Short Date' and Edit as 'Hidden Field' with Edit Format Default value: now()
Description:

Whenever I edit a record and save it, no data is saved in mysql database.
Any ideas?

admin 11/9/2005

the Default values in PHPRunner work only when adding new records, not updating.
To update your field with current datetime each time user edits the table please modify your ..._edit.php file.
Locate the following snippet inside it:

    foreach($evalues as $ekey=>$value)

        $strSQL.=$ekey."=".$value.", ";

and insert the following just before it:

$evalues["`LastUpdated`"] = "'".now()."'";