Error on Page_DataRendering event

HII put this script on listpage-> pagedatarendering()

$id=$this->id_kon->CurrentValue;
$pju=number_format(ExecuteScalar("SELECT COUNT(id_det) from detail22 where surname is not null and id_kon=$id "));

in version PHPM 2022 its working normally but in PHPM 2023 show error

C:\xampp\htdocs\web\vendor\doctrine\dbal\src\Driver\API\MySQL\ExceptionConverter.php(86): An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1064 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 ‘’ at line 1i try to put in listpage-> pagedatarendered() it work normally

did i miss something in PHPM 2023?TIA

Because there are no data yet can be displayed from CurrentValue property of the field in Page_DataRendering server event. So your code will trigger an SQL error since there is no param supplied into it.In the other side, it works in Page_DataRendered server event, since the data are already loaded.

ThanksI see now in PHP Maker 2022 PageDataRendering have value in CurrentValue (my project working normaly)
so in PHP Maker 2023 PageDataRendering has been change not value in CurrentValueTIA

As the server event name (“Data_Rendering”) suggests, the event is fired before rendering data, so the data may not be loaded yet unless you are using it in View/Edit/Copy pages.