This topic is locked

error on update

10/25/2021 3:22:45 PM
PHPRunner General questions
P
paulo author

When placing a custom button the code fails

$record = $button->getCurrentRecord();
$i=(int) $record['Importancia'];
$i=$i+1;
$idproj= (int) $record['ID_projeto'];

$sql="UPDATE t_projectos SET Importancia=".$i." WHERE ID_projeto=".$idproj;

DB.Exec($sql);
echo $sql;

The echo displays an error and shows
UPDATE t_projectos SET Importancia=2 WHERE ID_projeto=38[]

The SQL command in database works.

I am trying to place a * button than increases the value by 1 when it is pressed.
I am not sure if i have to update the display of the value.

Sergey Kornilov admin 10/25/2021

What is the error message?