0 Instead of NULL inserted for optional/NULL Fields

For some reason, PHPMaker is adding ‘0’ to fields that are set to allow NULL in MySQL with Null also as a default value. I have double-checked my MySQL database and the field is definitely set to allow null and have NULL as a default value.Has anyone else experienced this issue before? This is a problem as it is influencing the dropdown menu bar, as empty parent menus must have NULL instead of 0 to function properly.I have even set the Default Value in PHPMaker as NULL, not fixing the problem either.Thanks

You may post your table(s) schema, including some records inside. In addition, you may post your fields setup in your project, that related to that field(s).

PHP < 8 issue. Try v2022.7.

Hi

If i add lines like this in Row_Renderedif ($this->durationc->DbValue === NULL) $this->Durationc->ViewValue = “”;I can get rid of the 0 - i will need to add this to Row_Rendered in every table and for every field that may have a null valueKind Regards
John B

Or you may simply use:if (empty($this->durationc->DbValue)) $this->durationc->ViewValue = “”;

Thanks - All fixedJohn B

For optional or empty fields, entering ‘0’ rather than NULL can cause data inconsistencies and make searches or data processing more difficult. To preserve data integrity and guarantee accurate database operations, it matters to handle NULL values properly.