does not update the value if there is already a value

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Rachman
User
Posts: 88

does not update the value if there is already a value

Post by Rachman »

Hi,
I have a datetime field type Auto-Update Value = CurrentDateTime().
how do I update my datetime data and it doesn't change.
datetime changes only occur when adding new data

Thank You

if (CurrentPageID()== "edit"){
        if (empty($this->date_in->DBValue)){
            $rsnew["date_in"] = CurrentDateTime();
        } else {
            // If the value already exists there is no need to update it again
        }
    }

arbei
User
Posts: 9384

Post by arbei »

Rachman wrote:

if (empty($this->date_in->DBValue)){

You should check $rsold["date_in"] instead.


Rachman
User
Posts: 88

Post by Rachman »

noted, thank you


Post Reply