Update current record when click on View

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

Update current record when click on View

Post by faraz »

When i click on View, i need the current record should populate with current date/time. But following is not working:
ServerEvents->TableSpecific->ViewPage->Page_Load
ExecuteScalar("update first_status_changed set converted = NOW()
WHERE customer_id = '" . $rsold['customer_id']. "' ");

facing following error:
Notice: Undefined variable: rsold in C:\xampp\htdocs\mip2019\classes\submissions_view.php on line 1790
Notice: Undefined variable: rsold in C:\xampp\htdocs\mip2019\classes\submissions_view.php on line 1793

please suggest any idea.


sticcino
User
Posts: 1043

Post by sticcino »

there is no $rsold in a view.


faraz
User
Posts: 35

Post by faraz »

Then what should be used instead ?

Please help.


sticcino
User
Posts: 1043

Post by sticcino »

$this->FIELD_NAME->CurrentValue;

review the generated code.


faraz
User
Posts: 35

Post by faraz »

echo $this->customer_id->CurrentValue;

The above showing no value when echo on View page.


mobhar
User
Posts: 11729

Post by mobhar »

Put that code in Page_Render server event instead.


Post Reply