Good Afternoon Abu.
I´m sorry, i´m a bomber this days for a new aplication development.
as seen before, when i use the custom event “on_after_update”, i get some cells content a seen :
function after_update($data){
global $g;
$Terminal = $data[“Terminal”];
$PPD= $data[“params”][“PrecioPorDosis”];
$Bonos = $data[“params”][“Bonos”];
$Establecimiento = $data[“params”][“Establecimiento”];
$PrevData = ‘[{“PPD”: ‘.$PPD.’,”Bonos”: ‘.$Bonos.’, “Est”: “‘.$Establecimiento.'”}]’;
$Sql = “UPDATE datos SET PrevData = ‘$PrevData’ where Terminal = ‘$Terminal'”;
$result = $g->execute_query($Sql);
}
the problem is that the field terminal defined as this :
$col = array();
$col[“title”] = “Terminal”;
$col[“name”] = “Terminal”;
$col[“width”] = “15”;
$col[“hidden”] = false;
$col[“show”] = array(“list”=>true, “add”=>true, “edit”=>true, “view”=>true, “bulkedit”=>false);
$col[“link”] = “index2.php?terminal={Terminal}”;
$col[“editrules”][“readonly”] = true;
$cols[] = $col;
the problem es that when i capture the data i obtain this :
<a href=’index2.php?terminal=80001’>80001</a>
instead the contain 8001
any solution ?
best regards.
Hi,
In callback after_update, You can put:
$Terminal = strip_tags($data[“Terminal”]);
Sorry to bother you again.
A new problem appears with this, Terminal is the first column in the row, so it´s the index and i get this error after update:
Couldn’t execute query. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘index2.php?terminal=141002′>141002′)’ at line 1 – UPDATE datos SET `Establecimiento`=’Bar Kyuco ‘,`Email`=”,`Telefono`=”,`PrecioPorDosis`=’0.18′,`Bonos`=’60’,`PrevData`='[{\”PPD\”: 0.18,\”Bonos\”: 60, \”Est\”: \”Bar Kyuco 3\”}]’ WHERE `Terminal` IN (‘141002‘)