This topic is locked
[SOLVED]

What is the correct code ?

2/8/2022 11:26:04 AM
PHPRunner General questions
J
Jan author

Hello everyone,

I have two tables," members" and "members_old"
The grid of the table "members_old" is visible in the designer from phprunner.
I have placed a custom_button in the designer, and when I press the button, the intention is that the value from the fieldname "name" from the table members_old is placed with the correct member number in the table "members" (so an update of the table "members" )
On the server side I wrote the following code:

while($record = $button->getNextSelectedRecord())
{
$sql = "Update members set name =" .$record["name"] where membernumber=".$record["membernumber"];
DB::Exec($sql);
}
CustomQuery($sql);

But the code doesn't work.... Who can help me, what's the right code? thanks.

J
Jan author 2/9/2022

It's fixed, the ability to mark records was not provided, now it works, so the query was correct. thanks