This topic is locked

In V11 make empty fields be null and not an empty string

10/21/2025 13:16:01
PHPRunner General questions
A
asawyer13 authorDevClub member

Is there a sql update statement I can do in the dev server database to make all fields put null in any field that's saved rather than an empty string?
In 10.91 I could edit the xml project and change every field but not sure how to do that in V11.
I know I can manually make the change in each field but it's a lot of work.
Thanks
Alan

ChatGPT 10/21/2025
Sergey Kornilov admin 10/21/2025

You can check $sqlValues parameter in BeforeAdd and BeforeEdit events. You can use this parameter to assign NULL values to any field i.e.:

$sqlValues["fieldName"]="null";

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