This topic is locked

Update record in another table

3/13/2018 9:31:03 PM
PHPRunner General questions
A
alfonso authorDevClub member

I have in a news table "Before record added": a function that adds a record in other table "fotos" with the image added in table news. All is ok:
$tblEvents = $dal->Table("fotos");

$tblEvents->Value["foto"]=$values["foto"];

$tblEvents->Value["descripcion"]=$values["titular"];

$tblEvents->Value["fecha"]=$values["fecha"];

$tblEvents->Value["categoria"]='10';

$tblEvents->Add();
The question is how can I do to update record in table "fotos" if I edit record in table "news" and change image field. I see in Edit Page: "Before record updated", but I have no idea.
Can anybody help me?

admin 3/14/2018

You can use the same DAL functions to update a record:

https://xlinesoft.com/phprunner/docs/update.htm